RTC Website

Summary

In this chapter, we have learned how to model and to open-loop control motors, how to organize programs as FSMs, and how to implement wait-based timing. The following points summarize the chapter:

  • Dynamic systems models of DC motors, in the forms of state-space and transfer function models, couple the dynamics of the electrical and mechanical aspects of motors, and are driven by an ideal voltage source or current source.
  • Powering a motor is achieved with an amplifier, which combines the uncontrolled power of a power supply with the controlled adjustability of a computer’s analog or digital output.
  • Amplifier inputs can be analog or digital, voltage-controlled or current-controlled. Outputs can be analog or switched and approximate ideal voltage or current sources. Accordingly, the model should use the appropriate source type (voltage or current).
  • Linear motor amplifiers have analog outputs and are built from transistors. Significant linearity can be achieved with feedback, especially for op-amps, which are able to achieve high power with a power booster, push-pull output stage.
  • Switched motor amplifiers produce outputs that turn on and off at high rates. Digital inputs gate this output with a pulse-wave signal, often via pulse-width modulation (PWM). Varying the mean (e.g., varying the duty cycle of PWM) adjusts the effective output delivered to the motor. The mean dominates behavior at high frequencies due to the filtering effect of the electromechanical system’s frequency response. An H-bridge circuit allows the output sign to be flipped.
  • Switched amplifiers are now more common than linear amplifiers due to the high efficiency, compact size, and low cost of switched amplifiers. However, linear amplifiers are better for high-precision control applications due to their superior linearity.
  • The angular position of a motor shaft is measured by a rotary encoder. The most common in control systems are quadrature encoders, which have two data channels offset 90 “electrical” degrees such that the direction of rotation can be deduced. Absolute encoders encode absolute position information.
  • The target computer has DIs that are programmable for quadrature encoder inputs. It processes these inputs at up to 100 kHz in the FPGA.
  • A finite state machine (FSM) is an algorithm that maps inputs and states to outputs and new states. A state transition diagram is a graph with states represented as nodes and state transitions represented as edges. This information can also be organized in a state transition table.
  • A systematic method for writing FSM programs is to write a function for each state and call the current state function repeatedly until the function determines that a state transition is required, at which point it updates the current state and changes outputs.
  • For soft real-time systems, wait-based timing, in which a function of more-or-less known run time is executed to control timing, may be sufficient. This is insufficiently accurate or predictable in many cases, which will become clear in lab 4.

Online Resources for Section 4.7

No online resources.