Customizing the Volts/Hz Controller block

Make the following modifications Volts/Hz Controller:


The input speed for this block is assumed to be the speed of the chuck; therefore, a gain block is used to scale this speed up by a gear ratio of 10 since this controller affects the speed on the motor side. RPM is then converted to hertz by using a unitConversion block set to RPM├×rad/sec and then dividing the output by 2p. The value 2p is produced by using a const block set to 2*pi.

The measured speed comes from the Rotary Absolute Encoder|topic=Setting up the motor\, load\, and encoder and is in radians per second. This measurement is converted to hertz simply by dividing by 2*pi. The desired speed in hertz is fed into a summingJunction block, as well as the command input of the PID Controller-Digital block. The desired speed directly feeds the inverter/amplifier as the feed forward component of the control. PID Controller-Digital  block output is used to correct for minor errors in the feed forward component. The sum of these two components is fed to the inverter/amplifier, the sum is limited to 70 hertz to prevent running the motor into its unstable region of control. The output of the limit block feeds the Square Wave Inverter-3 Phase block. The Square Wave Inverter-3 Phase block rail voltages must be set to 0 and 1 to provide logic control rather than bus level voltages:

The output of the control summingJunction block is scaled inversely proportional to frequency by using a gain block with the factor 230/60. The output is then limited between 0 and 230 volts, and defined as a variable with the user-defined name amplifier_gain.