Introduction to Mechatronics
Project 2 Motor Speed Control Spring 2000
Requirement: Develop a motor speed control system for testing an automotive cruise control unit
System Specification:The system should act like an automobile cruise control operation. The control hardware uses the Analog Device RTI–815 interface board to control the speed of a DC motor that emulates the car speed. The motor control applies a PI control algorithm and the control algorithm is updated periodically with appropriate sampling interval. A joystick is used to simulate the gas pedal (forward means accelerating), the forward pressed gas pedal increases engine output torque as simulated by a term added to the motor control (See figure 1). There is a software generated drag force term, which is proportional to the square of the car speed and is in the opposite direction of the car velocity. One of the two buttons of the joystick represents the “ignition key” to start and stop the motor, and the other button gives the “brake” signal to the controller. The motor controller has two VB frames. First frame accepts the user input to the proportional and integral controller gains and controller sampling intervals. The second VB frame emulates the car dashboard display panel, which shows the car speeds and cruise on indicator. The second frame should also include the cruise control input buttons on the steering wheel. The three buttons are “cruise on/off”, “set/acc” and “resume/dec”. You should also have two LED’s connected to the digital output port to indicate the motor start/stop (ignition key) at bit 0, and cruise on/off at bit 1. The logicfor the cruise control operations are omitted here, which should be described in your report in detail. Include other features in addition to this minimal requirement description and make the system accurately represent the actual cruise control operation.
The project report should be a technical report, which includes an introduction of the system capabilities, a detailed system specification, description of the system behavior with the aid of a State Transition Diagram and/or State Chart, description of the hardware with the aid of system schematics, description of the software with the aid of flowcharts. You should also include some plots, which show the motor speed transient responses to step change in reference speed and disturbances like climbing a hill.Analyze your results for a number of PI gains and sampling interval combinations. Provide a CPU timing diagram and a time loading analysis.
Some hints on the project development follow. You need to make modifications to the software used in Lab 1-3 and to integrate them into the specified system. Try to make as few modifications as possible. You are to integrate the sample programs provided to you and add the necessary cruise control logic. You should never write programs from scratch. You will need to use the software drivers for the RTI-815 digital and analog I/O developed in previous lab assignments, the motor PI control using the RTX timer interrupt function and the already existing VB forms. You should try to use the samefunction names for these interface drivers so that the motor control program can be used with minimal modifications, possibly by only changing the header files and a few lines specific to the specification.Exercisesystem encapsulation to divide the work into a few modules within your project team. Make sure you analyze the system operation by using StateChart/State Transition diagram and flowchart before you dive into the coding.
Gas Pedal Drag Force
+ Speed
-
Figure 1: Motor Control Block Diagram
Program Start
PID tuning
Motor On Off
Motor Running (open loop)
Gas PedalDrag Force Cruise on Cruise offUpdate
time up
Update AmpOpen Loop Motor OperationDashboard
Input Motor Display
control
setresume brake
Closed loop motor speed control
Figure 2: Incomplete State Chart