Discussion:
How to build a state observer for feedback control?
(too old to reply)
DiegoSa
2006-12-12 10:10:09 UTC
Permalink
I built my observer model in matlab (attachment) that works with a Runge-Kutta integration method.What I tried to do in LabVIEW was to simulate the observer without the data aquisition (attachment), i. e., I tried to run the observer as a model of my real system but the integrators go to saturation. Those integrators are from the Real-Time module: Control -> Advanced -> Continuous Linear -> Integrator.vi). I also tried the discrete integrator but had the same problem.Can you give me some informations about how to translate my observer model in matlab to a model in LabVIEW?


observer.JPG:
Loading Image...


observer.vi:
http://forums.ni.com/attachments/ni/170/219827/2/observer.vi
Vern7ez
2007-11-06 16:40:07 UTC
Permalink
Hi,
I have a problem to design a full-order observer in LabVIEW,
I have converted a Simulink file (the JPG in attachment, "Full Order Observer1-MATLAB")
into a LabVIEW VI (the JPG in attachment, "Full Order Observer2-LabVIEW-Blok Diagram"
and "Full Order Observer2-LabVIEW-Front Panel") using Simulation Translator,
and the output both of the Scope is not same.

I have tried change Scalar A, B, C, L, K into Vector,MatrixGain but still error.

Please reply, I need solution for my problem, thx.

Forgive for my bad English.

Note : I don't have LabVIEW Control Design Toolkit.


Full Order Observer2-LabVIEW-Front Panel.JPG:
http://forums.ni.com/attachments/ni/170/282678/1/Full Order Observer2-LabVIEW-Front Panel.JPG


Full Order Observer1-MATLAB.JPG:
http://forums.ni.com/attachments/ni/170/282678/2/Full Order Observer1-MATLAB.JPG


Full Order Observer2-LabVIEW-Blok Diagram.JPG:
http://forums.ni.com/attachments/ni/170/282678/3/Full Order Observer2-LabVIEW-Blok Diagram.JPG
DiegoSa
2007-11-07 15:10:21 UTC
Permalink
Hi there!
 
To solve my problem I used an ODE Cash Karp 5th Order solver from Analyze -> Mathematics -> Calculus -> Differential Equations. There are more ODE solvers that you can use. I run the ODE solver at each control iteration to find the state vector using the observer equations in time's domain. Read LabVIEW Help related with ODE solvers and you will find the solution quickly. If you can't figure it out message me again.
 
Regards,
Diego Sá
Vern7ez
2008-01-06 19:40:05 UTC
Permalink
Hi, thank you for fast reply and forgive me for my late reply.Sorry Diego Sá, I can't figure it out, I'm noob with observer.What is your input and output in your LabVIEW ?I have made observer (attachment Obs1.vi) with inputs are transfer function like Numerator, Denominator, and Input u. And outputs are transfer function and chart.I need to control the position of a DC motor, but in this LV the transfer function still example.Is my LV has correct or not ?I have edit the MATLAB Script from M-file (attachment sfsotest.zip).And I need algorithm for desired closed-loop pole locations ("clp" in my MATLAB Script Node), so I can set the Settling Time and Damping Ratio. Please reply as fast as you can, I hope like before.Thx very much.


Obs12.vi:
http://forums.ni.com/attachments/ni/170/293230/1/Obs12.vi


sfsotest.zip:
http://forums.ni.com/attachments/ni/170/293230/2/sfsotest.zip
DiegoSa
2008-01-08 18:10:07 UTC
Permalink
Hi there Vern7ez,
 
At the moment I'm at work. Here I don't have LabVIEW so I can't see your VI right now. I'll try to find my observer implemented in LabVIEW to send it to you (it was some time ago :)) Give me your email if you are interested.
Meanwhile, give me some time to study your problem...
 
Regards,
Diego Sá
Vern7ez
2008-01-11 08:10:06 UTC
Permalink
Hi there Diego Sá,this is my email "***@elect-eng.its.ac.id" and this is my VI pictures (attachment JPG), I'm use labVIEW 8.2.Thx very much.


Obs1 Block Diagram 21.JPG:
http://forums.ni.com/attachments/ni/170/294292/1/Obs1 Block Diagram 21.JPG


Obs1 Front Panel1.JPG:
http://forums.ni.com/attachments/ni/170/294292/2/Obs1 Front Panel1.JPG


Obs1 Block Diagram 11.JPG:
http://forums.ni.com/attachments/ni/170/294292/3/Obs1 Block Diagram 11.JPG
DiegoSa
2008-01-08 19:10:06 UTC
Permalink
Hi there again.
Sorry, I just have LabVIEW 7.1. Can you send some pictures of your VI?
Regards,
Diego Sá
Continue reading on narkive:
Loading...