LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a LV model for VeriStand

Hello,

 

I'm new to Labview, so probably I must lack some basics. Right now I'm attempting to generate a model for a Physical component for a HIL system. The physical component consists on two input and one output that are controlled by an ECU. The two inputs are solenoids that receives PWM signals to "Fold"/"Unfold" a structure. The output is a reading from an angular sensor.

 

To simulate it I suppose it must "integrate" the signal positively of "Unfold" and negatively of "Fold". This would have an acceptable behavior. My first attempt to do it resulted in the following block diagram:  

brunorodrigues_0-1625747098096.png

I imported this to Veristand and I believe it works OK, not great. The rate of add/sub is dependent of the Primary Control Loop rate, the actual rate should be only time dependent.

 

To simulate some PWM signal (for testing purposes) I created another model for it, as shown on next figure:

brunorodrigues_2-1625749748029.png

From this model I was able to generate a Square Wave and map to one of the first model inputs. That's when I found some issues related to, in my opinion, the VeriStand PCL rate.

 

First issue is for sure is the wave itself: plotted wave frequency does not match to frequency setted. The first figure shows the PCL at 100Hz and the second at 1000Hz:

brunorodrigues_4-1625750353654.pngbrunorodrigues_5-1625750471015.png

 

 

At some frequencies there is no oscillation at all (it sticks at -1 or 1):

brunorodrigues_6-1625750576207.png

 

I'm figuring out that when the actual signal is acquired the model may need higher rates to give a proper response to PWM. I believe that our PXI is supposed to support 3000Hz rate, so maybe that's not a great problem. I still have some doubts about how those models run, if I should build them to Windows or to our final deployment system, if the rate of those models can be unrelated to PCL rate.

 

What is the best way to design a model for this? Wish you guys share some thoughts about this, any reference will be great!

 

Thankfully,

Bruno

0 Kudos
Message 1 of 1
(717 Views)