LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID multivariable SOMEBODY HELP! PLEASE!

Hello everyone!, i´m here because i need your help.... yes...your help.... why?. because i´m working with a classmate in our tesis, wich is "Dinamic control of a distillator tower" well.. at this point we have created the VI, we are conscient that isn´t pretty well but... it works... how it works?

 

1- We are distilling a mixture of Ethanol and Water, receiving the Concentration of the distillate and also all the temperatures in the tower, controlling the value of the Heater(Power) and the Flux of the partial Condenser.... So... that´s all..

 

BUT... now we need to set a value of the Alcohol Concentration, for example 80° set it and see how the sistem regulate the Flux of condenser and Heater Power, by the way... Separated, one of another, it´s not necesary that bouth to be working at the same time:

 

Alcohol concentration--->PID( SET POINT)---->controlle Flux of condenser--_> Produce a change in our Concentration--> PID--->....

 

 

Alcohol concentration--->PID( SET POINT)---->Heater Power--_> Produce a change in our Concentration--> PID--->....

 

 

We tried searching for some example... but... it wasn´t successful... i mean... how do we conect the out put of the PID? it is possible to do this if we need to work with one or another variable?( Condenser Flux or Heater)

 

 

Here i attach our VI, how i said... i started putting the PID EXAMPLE... and then i clearly saw that.... OH MY GOODNESS this is so difficult..

 

 

HOPE SOMEBODY HELP US. we would be very grateful

 

 

Felipe Kim V

Nicolas Paniagua G

 

 

 

0 Kudos
Message 1 of 23
(2,739 Views)

Hello again! well.... i keep traying to solve this... but... it´s been pretty dificult, i just conected some strings but... to be honest I don´t know what to do, i did this, but when i put "start" it keeps freeze with a red light  flashing, im sure that i´m making a mistake, hope you can help us...

 

0 Kudos
Message 2 of 23
(2,726 Views)

@NikoP wrote:

Hello again! well.... i keep traying to solve this... but... it´s been pretty dificult, i just conected some strings but... to be honest I don´t know what to do, i did this, but when i put "start" it keeps freeze with a red light  flashing, im sure that i´m making a mistake, hope you can help us...


Can you try to provide a more clear explanation of what you want to accomplish?  Also, it would help if you clean up your VI, since it won't fit on a screen (well, mine, at least).  I don't see any red light in your code - what red light is flashing?

0 Kudos
Message 3 of 23
(2,715 Views)

Hello nathand! well... i´m gonna try to explain it... in a better way... sorry for my english by the way..

 

We need to control the alcohol concentration of a mixture(Ethanol-Water) controlling two variables: Heater Power and  Flux of condenser(with a bomb), but separated you know what i mean, for example:

 

in the first case:

 

We need a mixture of 80% alcohol.. So... we should start the distillation... put it as a Set point 80% and wait till the system(PID) reaches the desired value( usin the Heater power as variable)

 

 

Sexond case:

 

We need the same mixture of 80% alcohol.. So... we should start the distillation... put it as a Set point 80% and wait till the system(PID) reaches the desired value( usin the Flux of condenser, controlled with a bomb, as variable)

 

That´s all, i mean, bouth are Simple Closed loop´s, but... at this point wa have no idea of how to do that, we are studying chemical engineering and this is for our Tesis.

 

and... when i mencioned the "red flashing light" i was talking about the Red circle, the Stop button, wich start´s to blinking, what else?... i dont know how to show the entire program, we have that problem too when we try to see all of it, it´s pretty umcomfortable.

 

 

So....I dont´t know if we can program it bouth in a VI or separated in two VI´S

 

If you could help us, it would be awesome, we would be so much greatful

 

Please Nathand help us!

 

Regards

 

Felipe Kim Vallejos

Nicolas Paniagua G

 

0 Kudos
Message 4 of 23
(2,709 Views)

Have you gotten some simpler program working in LabVIEW?  I recommend that you try to get a single PID loop - one input, one output - working first.  Once you understand that, then you can move on to a more complicated program.

 

The easiest way to condense your program will be to move some functions into subVIs.

 

I don't know what would cause the STOP button to blink, maybe you have a breakpoint set somewhere unexpectedly (if you're using a recent version of LabVIEW, you can use the breakpoint manager to check).

0 Kudos
Message 5 of 23
(2,705 Views)

You are right saying that we should do a simple Vi before this one... but... well.. i tried using the examples but it was complicated, for example, there´s a simple channel-Pid example, it show´s "channel input" and "channel output", so my question is: "how can i program the PID if i´m receiving the Concentration using VISA"?

 

if you see our VI, we have programed a producer/consumer with a Visa, because the signal of Concentration comes from a Densimeter with a RS-232

 

So.. yes... we should try with basicals PID, i don´t know, maybe trying programing a simple-loop, seting the Temperature, controlling the Heater.. or who knows something like that...

 

by the way, did you see our VI? specifically the PID, i put the same Signal(concentration from VISA) as input, but when i had to take the output.... that´s the reason why i´m here...

 

this is being so dificult.

 

 

0 Kudos
Message 6 of 23
(2,703 Views)

You don't have a producer-consumer, you have something non-functional.  It is too complicated because you started trying to code everything at once, without any structure.  Start with a small working program and then build it up slowly, testing each part as you add it.  I tried to take a look at your VI but there is so much disorganization - and large blank areas - that it is almost impossible to follow.  I don't know how you can manage to work on it.

 

You're hitting a breakpoint just after the Fract/Exp to String function inside the loop with the PID functions.  The PID will not function properly because the process variable won't update regularly.  If you try running your program with execution highlighting enabled (the light bulb icon in the toolbar) and you can somehow follow it, you'll see the problem.

 

My advice is that you start over.  Write a small VI, a single loop, that reads your process variables and displays them.  Then add a way to control your outputs manually inside the same loop, and see that the process variable changes.  When that works, put a PID function between the input and output - again, keeping everything in a single loop unless there's some good reason to make it more complicated than that.  Once you can control a single process variable, add the second one.

0 Kudos
Message 7 of 23
(2,697 Views)

i see... well.. we did it.. but... when we put everything in a loop... 

 

 

Ni-9008-> 7 temperatures                                               Everything saved in Excel

Ni6008->  input-> Heater

               output->Heater(manual)

               output->bomb(Flux condenser)(manual)

               

VISA(usb)-> Densimeter

 

 

The system works... yes.. but with problems.. with 7-8 seconds of lag... so... for example, if we want 5VOLTS in the heater, it takes 7 seconds to give that power.

 

We asked for help here in the forum, and some guys adviced us to use Consumer/Producers, and yes... it worked...

 

So... at this point start again from the beginning it would be a little.... complicated. because maybe we´ll have the same situation.

 

 

 

0 Kudos
Message 8 of 23
(2,695 Views)

Which loop is supposed to produce, and which is supposed to consume?  What do you mean "it worked"?  If your program was working, you wouldn't be asking for help...

 

I really cannot help you with your VI in its current state.

 

Where was the lag occurring?  If it's slow to retrieve data from the USB device, that's going to limit the rate at which you can run the PID loop.  It doesn't make sense to run the PID control any faster than you can retrieve the process variable.  Now, if you can read one process variable faster than the other, then it might make sense to use two loops running at different rates, but it will be much simpler if you start with just one.

 

I suggest leaving out the saving data for now, or at least moving it into a subVI.

0 Kudos
Message 9 of 23
(2,691 Views)

When i said "it worked" I mean that works manually, as i said, we put the power of the Heater, the flux with the bomb and  so on... the distillation continue.

 

 

So now im asking for help, because i have no idea of how to programe the PID, you don´t need to be rude with us.

 

it was just a Help Request.

 

 

0 Kudos
Message 10 of 23
(2,689 Views)