From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control and simulation Module Spring Mass

Solved!
Go to solution

Vasco, 

 

Related to this profile generation, I think you are complicating the process here. I recode your profile generation below according to the picture you have on the block diagram.

generate sequence.png

 

The profile works the following way: 

1. Convert the Table (string) to array. The Fract/Exp String To Number accepts matrices of strings, making it easy to convert

2. Obtain the X and Y as arrays, since we need this input for the Lookup Table

3. Reduce the Step Size of the function to 0.01. This is necessary to obtain the 'sharp' profile you have

4. Use the Reminder to repeat the time over and over ( I used 6 s for that)

 

If you could look into that code, it should should provide you the "repeating sequence" that you'd like to have in Control and Simulation. We will consider adding this functionality in the future.

 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 21 of 59
(1,400 Views)

HI!

 

Realy works well ... I have tested andcame to the conclusionwhat are the rules to use it right ...

 

It is important that the maximum or last value in the Table(x-value) is the same value for the simulation time .... and also is the same value as simualtion time the y value at Quotient/reminder ... e.g. last value in the graph is 5 (as biggest) ... 

 

Answer-Control_Simulation-1.jpg

 

Maybe my question was not answered about the step profil, which is very common/frequent in the dynamic ("overshoot") analysis .... certain time at certain speed level and the sharp change .... how can lookup table follow such working profile accurately ?! I have also posted proposed solution how to build the step profile, which has to be accurately followed by the dynamic system .... like in thediagra below ...

 

step-profile.jpg

 

And  just a comment about the posted VI files ... save please Your VI for posts in older versions (like 2009) .... You have version 11 ...

Answer-Control_Simulation.jpg

0 Kudos
Message 22 of 59
(1,393 Views)

Hi!

 

I have looked in Your reply... works, but have limited success ...

Answer-Control_Simulation-1-peak.jpg

 

Both graphs shoud display same results (locations and amplitudes) .... time (X) and curve values (Y) should be same as in the resulting tables ... both graphs are the same, with same results  and have scaling factor 1 ... only the scale for Y is set on 0,35 ...  

 

The transfer function for the model is the same, but written in 2 different ways ... to check the validity of own results ....

 

Thanks!

 

 

 

 

0 Kudos
Message 23 of 59
(1,387 Views)

 To obtain the sharp corners, you just need to repeat the values with the same time. The look-up table with linear interpolation should take care of it. For example, your 'doublet' profile should be:

 

X     -     Y

0          400

0          600

0.03     600

0.03     200

0.06     200

0.06     400

 

The code I already posted should take care of it. 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 24 of 59
(1,385 Views)

Vasco,

 

When I said "don't change multiplier of charts", this is what I mean:

 

dont change multiplier.png

 

Your charts have this properties changed from 1 and this will give your the results you can't understand. Please edit the charts and use offset =0 and multiplier=1. That should make your results from Location and Amplitude match the chart.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 25 of 59
(1,381 Views)

Hi!

 

Now both solutions run perfectly .... but how you then make "envelope" curve which "sits" on maximum peaks of curve ?!

 

This is the criteria of damping ....xy graph interpolated and then combined with the resulting graph below ... Smiley Surprised

 

Thanks!

 

 

Damper-simulation-peaks-combine.jpg

0 Kudos
Message 26 of 59
(1,374 Views)

Please open and see this example:

 

examples\Control and Simulation\Control Design\Classical Control Design\CDEx PID with Constraints.vi

 

It has the features that you'd need to create an envelop.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 27 of 59
(1,368 Views)

Hi!

 

I have made a step ahead ... step stimulus is applied with the mass damper (SDOF) system ... this iscompared with the pulse excitation ...

 

I have difficulty to present the data on the graph ... response on each sequence of ecitation ... not only on part of signal but the whole ...

 You have idea ?!

 

Thanks !  

 

 

Control-simultion-steps-response.jpg

0 Kudos
Message 28 of 59
(1,358 Views)

Hi VASCO-1,

 

It's good to see that you're making progress with your application! With regards to your question about displaying the system response on the waveform chart, you simply need to increase the chart history length. To do this, go to the front panel and right click on the inside of the chart of interest (not on the axes), and then select "Chart History Length". I changed the length to 2000 for your bottom chart ("Simulation 2", Response Amplitude) and this was sufficient to display the entire signal before the chart began to scroll (see below). For more information on this, and the caveats associated with increasing chart history length, please take a look at this article: http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/customizing_graphs_and_charts/.

 

chart_history.png

0 Kudos
Message 29 of 59
(1,345 Views)

Hi Joseph!

 

I have run the simulation 2 according to Your guidelines ... it's OK.

On the other hand ... the upper simulation has 2 failures :

1.) the graph with excitation path and response (Simulation 1) - "disapear" immeadiately after the simulation (10 seconds);

2.) at the resulting path appears additinal step (10 600), which is unintetional added ?!

 

I hope this would be final solution step for me, before I start with real model data.... Smiley Happy

 

Thanks again and best regards!!

 

Vasco

Control-simulation-steps-response-graph.jpg  

0 Kudos
Message 30 of 59
(1,335 Views)