LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to implement state feedback controller on labview?

hi folks,

 


I am working on ventilation controller for laboratory scaled chamber. I have designed a state space feedback controller  but I am having problem in its implementation on labview. Please somebody help me with that. I am attaching my State space controller.

 

0 Kudos
Message 1 of 9
(5,487 Views)

Some more information is needed:

Loop time?

What type of analog input and output hardware are you using?

 

 And here is a small version of your picture 😉 30kB instead of >1MB

IMG_20130514_172456-1 small.jpg

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 9
(5,453 Views)

Hi Henrik,

 

Thanks for your response, I am using output signal of 0 to 5 volts to the fan installed in the ventilation chamber. And I can vary loop(I am asuming for loop?) time accordingly as I want,  to run the fan for spesific time.  Actually I have no idea that which tool to use to implement my this controller in labview.

 

 

Thanks for smal version of the pic 🙂

0 Kudos
Message 3 of 9
(5,443 Views)

A simple PID controller simultation can be found here as a starting point.

Again: What hardware are you using? (to read the fan speed into LabVIEW and to output the control value)

What LabVIEW version ?  Simulation and control toolkit?

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 9
(5,431 Views)

I am using Ni- USB 6218 . I am not measuring fan speed I am just measuring ventilation rate through air velocity transducers at the chamber outlet.

LabView Version 2012 (32 bit).

 

Henrik you just tell me how can I implement state space controller attached using control and simulation toolkit, everything else is working fine. Thanks in advance

0 Kudos
Message 5 of 9
(5,418 Views)

I presume your question isn't as fundamental as how to define a loop that runs every Ts seconds (e.g. while loop or timed loop), and is more about implementing the state-space equations. Well you've got lots of options:

 

1) formulate your states using your measurements and controller outputs - feedback node will give you the (k-1) terms, then you can easily expand out matrix equations here to form the expressions relating the current states to previous states (e.g. y(k) = a*y(k-1)+b*u(k-1) ) which can then just be implemented using basic maths blocks, doing the same with the controller output equation.

 

2) use matrix maths blocks (Linear Algebra VIs pallette) with the matrices being either fixed (e.g. the 3x3 A matrix) or varying (e.g state vector)

 

3) implement in Mathscript node with matrix maths

 

4) use state space controller block in Control Design and Simulation Module (if you have that add-on)

 

You've got to work out how to initialise things - maybe having everything zero would be fine, maybe not

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 6 of 9
(5,387 Views)

Hi Andy,

 

Thanks for your response, Yes I have state space controller block in Control Design and Simulation Module. But I don't know how to fill my design equations in that block to implement it. Infact I don't know how to use that block.

 

All I Want to do is shown in the bellow  attached block diagram:

 

howevere I have found an example on the internet (Attached with this post) but in that they are using discreet observer and My supervisor does not want me to use state observer. Is there anyother way to calculate the state vector without using state observer?

And please suggest me what should I write in 'CD Construct State Space Model.vi ' (You can see my design equations on picture attached with my previous post).

 

Download All
0 Kudos
Message 7 of 9
(5,369 Views)

First separate out your state space model of the system, then define what type of state space controller you want to use. It looks like you have done both these, but just presented the end result. To use the blocks in the CD&SIM module you'll need to have the model and the controller type defined separately. There are different versions of state space control - pole placement, LQR, etc - so you have to make sure the method you want to implement fits with the specific VI.

 

The help files are very clear and give the various equations for the different types of model and controller. You may even need to re-formulate your controller to make it fit on one of the methods provided in those VIs.

 

Since you have got the final controller, why not just bypass using those VIs and implement using Matrix maths anyway. Seems the obvious thing to do.

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 8 of 9
(5,355 Views)

BTW - since you are a student, its much better you learn rather than just be given the answer. Hopefully my response points you in the right direction.

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 9 of 9
(5,353 Views)