LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

MathScript Nugget #13: Control Design in MathScript

For MathScript Nugget #13, I'll talk about something that's not even built-in to MathScript: the LabVIEW Control Design and Simulation Module. When you install and activate this product with MathScript, you have access to over 100 new functions and three new datatypes in MathScript. These features are specially designed to design, analyze, and simulate linear controller models from within MathScript.

The datatypes that are added are called "transfer function", "state-space", and "zero-pole gain". These are different representations of dynamic system models, which describe the inputs and outputs of dynamic systems. The variables of these types in MathScript can be passed in and out of MathScript nodes just like built-in data types. Once outside of MathScript, you can use them with the Control Design VIs that also come with this module.

The Control Design and Simulation Module gives you access to functions to do a myriad of different things. To construct models of the types described above, you can use functions like 'tf', 'ss', and 'zpk'. To combine models in various ways, you can use functions like 'append' or operators like + and -. You can analyze models in the time and frequency domain by using plot functions like 'step', 'lsim', 'bode', and 'nyquist'.

All of the features that you know and love about MathScript work just the same with the Control Design functions and datatypes. You can see context help for the functions just by hovering over them, see the datatypes in a different color when type highlighting is turned on (pink, just like the cluster wire that comes out of the node), and view the variables in fancy displays in the MathScript Probe.

There are some great examples under <LabVIEW>\examples\Control and Simulation\Control Design\Mathscript to get you started with Control Design and MathScript. Enjoy!

Happy New Year!
jattas
LabVIEW MathScript R&D

 

ps. Check out more MathScript Nuggets!

0 Kudos
Message 1 of 1
(6,475 Views)