Simulink Models for Autocode Generation
|
|
|
- Shanon Cobb
- 9 years ago
- Views:
Transcription
1 Simulink Models for Autocode Generation J. S. Freudenberg EECS 46, Fall 008 Simulink Models Suppose that you have developed a Simulink model of a virtual world, such as a wall or -mass system. We have seen how to choose the parameters of the virtual world so that it has desired properties. For example, we have seen how to choose the constant and inertia of the virtual -mass system so that it has a desired frequency of oscillation and satisfies a maximum torque limit. We also learned how to add damping to such a model to counteract the destabilizing effect of forward Euler integration. Once we develop a model of the virtual world that behaves correctly in simulation, it remains to implement this world in C code that can be executed on the MPC5553 microprocessor. Until now we have simply written the C code by hand, and have debugged any resulting errors as necessary. Such errors may arise from simple mistakes in implementing the force feedback algorithm, such as using incorrect parameter values or sign errors. They may arise in converting from physical units to units that the processor understands, such as duty cycle and encoder counts. Other errors arise from type conversions, such as those from signed to unsigned integers of different lengths. Furthermore, changes to the virtual world that are relatively easy to model in Simulink by adding additional blocks may require substantial work to code in C. The potential difficulties with hand coding control algorithms have not proven too burdensome in our lab exercises. However, many real world applications are much more complex, and the time taken to hand code an algorithm, with all the necessary debugging, may take months. Hence, if we already have an algorithm that works well in simulation, it would be advantageous to be able to generate C code directly from the Simulink model. Even if this code is not used in production, it may be used for testing on hardware, thus enabling the rapid prototyping paradigm for embedded software design. In this approach, control algorithms are first tested on a model of the system to be controlled. If the algorithms work correctly on the model, then autocode generation is used to obtain C code that can be tested on the mechanical hardware, thus enabling an additional level of testing and debugging to take place. The idea is that the algorithms will be known to work before they are coded into C, and thus any errors that arise must be in the coding, not in the original algorithm specification. Consider the Simulink diagram in Figure. As we have seen, with appropriate values of k, J w, b, and T, we may successfully implement a virtual mass system that is a harmonic oscillator with specified period that satisfies the limit imposed on the reaction torque. The C code required to implement this system on the microprocessor must perform several tasks in addition to computing the reaction torque for a given wheel position, as shown in Figure. Wheel position must be obtained from the QD function of the etpu. The duty cycle must be updated and sent to the PWM function of the emios subsystem. Because wheel position comes from the etpu in encoder counts, it must be converted into degrees. The reaction torque generated by the Simulink model is in N-mm, and must be translated into duty cycle. Variable type conversions must be performed. The etpu and emios peripherals on the MPC5553 must be initialized, just as we initialized them when hand coding in C. The various initialization and unit conversion tasks are tedious and error prone. We shall see that the best way to deal with these is to write Simulink subsystems that perform these tasks correctly. It will take some effort to do so, but once we are done, we will have a library of these subsystems that can be reused so that Revised October 30, 008.
2 reaction torque (N mm) Step in wheel (degrees) thetaz k constant /Jw /virtual inertia ddot T z dot T z b damping Figure : Discrete Simulation of Virtual Wheel and Torsional Spring with Damping (virtual wheel discrete.mdl). we never have to do these low level operations again. This will free us to spend time designing virtual worlds using the Simulink model, and then automatically creating the C code that runs on the microprocessor. To generate C code from a Simulink model, we shall need several additional software tools. These include Real Time Workshop [5], a Mathworks product that generate C code from a Simulink model and Embedded Coder [6], another Mathworks product that, when used in conjunction with Real Time Workshop, ensures that the generated code is compact and efficient. In addition, we shall need Simulink blocks that initialize the MPC5553 microprocessor and that supply device drivers for its peripherals, such as the etpu and emios. These latter blocks are available from the RAppID Toolbox [], a product of Freescale Semiconductor Corporation. Bit Manipulations Recall our use of the union command in C to access various bit-fields in a register. One can also perform bit manipulations using Simulink blocks. This is sometimes necessary when developing a Simulink model to generate code that must interface with hardware (think of the dip switches and LEDS in the lab). For example, Figures -3 illustrate a subsystem that converts a 3-bit unsigned integer into four 8-bit unsigned integers. The blocks used to build these figures are found in the Simulink Library Browser Menu: - Simulink/Sources/Constant - Simulink/Signal Attributes/Data Type Conversion - Simulink/Ports & Subsystems/Subsystem - Simulink/Sinks/Display - Simulink/Logic and Bit Operations/Bitwise Operator - Simulink/Logic and Bit Operations/Shift Arithmetic - Simulink/Signal Routing/Mux The same blocks may be used to build a subsystem that performs the reverse conversion, from four 8-bit unsigned integers to a 3-bit unsigned integer. Such a subsystem is illustrated in Figures 4-5. A more elegant way to perform bit manipulations is through the use of Matlab S-functions to insert C code directly into a Simulink block. We shall learn about S-functions in a subsequent handout. Port Data Types It is often convenient to have the data types of all signals displayed on the Simulink diagram. To do so, enable the option Format/Port/Signal Displays/Port Data Types. The results are illustrated in Figures -4.
3 ^5 Constant In Out Data Type Conversion Subsystem Display Figure : A subsystem to convert a 3 bit unsigned integer into four 8 bit unsigned integers (thirtytwobit foureightbits.mdl). Bitwise AND 0xFF Least significant 8 bits Vy = Vu Qy = Qu Ey = Eu Shift Arithmetic Data Type Conversion In Bitwise AND 0xFF00 Bitwise Operator Vy = Vu * ^ 8 Qy = Qu >> 8 Ey = Eu Shift Right 8 Bits Data Type Conversion Out Bitwise AND 0xFF0000 Bitwise Operator Vy = Vu * ^ 6 Qy = Qu >> 6 Ey = Eu Shift Right 6 Bits Data Type Conversion Bitwise AND 0xFF Most significant 8 bits Vy = Vu * ^ 4 Qy = Qu >> 4 Ey = Eu Shift Right 4 Bits Data Type Conversion3 Figure 3: Inside the subsystem block that performs the conversion in Figure. (0 0 0) In Out 56 Constant Subsystem Display Figure 4: A subsystem to convert four 8 bit unsigned integers into a 3 bit unsigned integer (foureightbits thirtytwobit.mdl). Data Type Conversion Vy = Vu Qy = Qu Ey = Eu Shift Arithmetic In Data Type Conversion Data Type Conversion Vy = Vu * ^8 Qy = Qu << 8 Ey = Eu Shift Arithmetic Vy = Vu * ^6 Qy = Qu << 6 Ey = Eu Shift Arithmetic Sum of Elements Out Data Type Conversion3 Vy = Vu * ^4 Qy = Qu << 4 Ey = Eu Shift Arithmetic3 Figure 5: Inside the subsystem block that performs the conversion in Figure 4. 3
4 3 Device Driver Blocks In order that C code generated from a Simulink model interface with the peripheral devices on the MPC5553, it is necessary to use device driver blocks that configure these peripherals. For example, in Figure 6 is a driver block for the QD function of the etpu. This block can be configured to specify which channels of the etpu are to be used for quadrature decoding. The outputs from the block include a 3-bit number that holds the current value of the 4-bit counter used by the etpu to keep track of wheel position. etpu Quadrature Decoder Set3 functions DC Motor Controls Position Count etpu: 0 Channel: 0 Secondary Channel: Angular Velocity (rpm) Max Speed (rpm): Position Counter Increments per Revolution (4 X lines on motor): 4096 Position Counts Scaling): PositionCounts X 4 FUNCTION NUMBER: FS_ETPU_QD_FUNCTION_NUMBER ENTRY TABLE ENCODING: FS_ETPU_QD_TABLE_SELECT Direction (0 pos: neg) etpu Quadrature Decoder Figure 6: A device driver block for the QD function of the etpu (etpu QD.mdl). The driver block in Figure 6 may be used to develop a subsystem to convert encoder counts into wheel angle in degrees. Such a subsystem is shown in Figures 7-8. Similarly, a subsystem may be created that converts reaction torque from N-mm to PWM duty cycle (Figures 9-0). Haptic Wheel Angle (degrees) Read Wheel Angle Figure 7: A subsystem to read wheel angle in encoder counts from the etpu and output wheel angle in degrees (read wheel.mdl). etpu Quadrature Decoder Set3 functions DC Motor Controls Position Count uint6 etpu: 0 Channel: 0 Secondary Channel: Angular Velocity (rpm) Max Speed (rpm): Position Counter Increments per Revolution (4 X lines on motor): 4096 Position Counts Scaling): PositionCounts X 4 FUNCTION NUMBER: FS_ETPU_QD_FUNCTION_NUMBER ENTRY TABLE ENCODING: FS_ETPU_QD_TABLE_SELECT Direction (0 pos: neg) Data Type Conversion Terminator z Unit Delay Data Type Conversion Terminator etpu Quadrature Decoder Haptic Wheel Angle (degrees) z Unit Delay Figure 8: Converting wheel position in encoder counts to wheel position in degrees. By replacing the step input and scope output in Figure with subsystems that interface to the MPC5553 (see Figure ) we begin to build a Simulink model that can be used for autocode generation of a virtual world. As in earlier labs, we only use 6 bits of this counter. 4
5 Torque (N mm) write torque Figure 9: A subsystem to input reaction torque in N-mm and update the duty cycle of the MIOS PWM module (write torque.mdl). Reaction Torque.8e Gain u+50 Bias Saturation Data Type Conversion 0000 DutyCycle Frequency Output Pulse Width and Frequency Modulation EMIOS Channel Number : 0 Initial Duty Cycle 50% Initial Frequency 0000Hz Internal Counter Bus Constant EMIOS Output PWM Figure 0: Convert torque in N-mm to torque in duty cycle. Reaction Torque Write Reaction Torque Haptic Wheel Angle (degrees) Read Wheel Angle thetaz k constant /Jw /virtual inertia ddot z dot z b damping Figure : Simulink model from Figure modified to interface with the MPC5553 (virtual wheel drivers.mdl) 5
6 4 Processor and Peripheral Initialization Although the basic functionality of the virtual world and its interfacing are captured in Figure, several items remain before it is possible to use the model for autocode generation. We need to initialize the microprocessor we are using, as well as the peripherals such as the etpu and the emios. We also need to control the timing with which the virtual world is updated; we have done this previously by using the decrement counter to generate an interrupt at a specified rate. Finally, we may need to structure the embedded software into several tasks that execute at different rates, and to address the resulting shared data issues. To accomplish the first item listed in the previous paragraph, we shall use an additional Simulink block, depicted in Figure. This block identifies the microprocessor target, the system clock speed, the C compiler used, and whether the generated code is in RAM or flash memory. It allows the user to specify whether a real time operating system (RTOS) is present, in which case we use OSEKturbo [], an OSEK/VDX compliant RTOS available from Freescale. If an RTOS is not available, the simpletarget option is selected. Menus for initializing the peripherals are available by opening the block in Figure. RAppID MPC5554 Target Setup System Clock : 8 MHz Target : MPC5554 Compiler : metrowerks Target Type : IntRAM Operating System : simpletarget RAppID EC Figure : Initializaton block from the RAppID library (RAppIDinit.mdl). 5 A Virtual Spring Inertia Damper System We can now build a complete virtual world, based on the damper system of Figure, that can be used to generate C code for the MPC5553. The highest level of the Simulink model is shown in Figure 3. The purpose of the processor initialization block in this model has already been explained. The model we wish to simulate must have device driver blocks added, as in Figure, and must be executed with a fixed time period. To accomplish the latter, we place the model from Figure in a Triggered Subsystem block and add a Trigger block, as shown in Figure 4. The trigger block causes the simulation to be updated periodically based on the Function-Call Generator block in Figure 3, which itself executes every T seconds. There is one additional difference between Figures 4 and. This is the presence of the Environment Controller block, which allows the block diagram to be used either for code generation or for simulation, in which case the input is obtained from the Step input block in Figure 4. Initializing Parameter Values with Callbacks It is possible to configure a Simulink model so that it initializes parameter values, such as sample time T and the and inertia constants, every time it starts. To do so, assign these values in the window File/Model Properties/Callbacks/InitFcn. Alternately, assign these values using an m-file, and place the name of the m-file (without the.m suffix) inside this window. The latter option requires that the working Matlab directory be the directory containing the Simulink model and m-file. Sorted Execution Order When Simulink is preparing to simulate a system that contains several blocks, it must order the execution of these blocks to account for functional dependencies between them and the times at which they need to be 6
7 RAppID MPC5554 Target Setup System Clock : 8 MHz Target : MPC5554 Compiler : metrowerks Target Type : IntRAM Operating System : simpletarget RAppID EC Function Call Generator Trigger() Out Triggered Subsystem Scope Figure 3: Highest Level of the Virtual Spring Mass Damper System (one virtual wheel autocode.mdl) Trigger Reaction Torque Write Reaction Torque Step Data Type Conversion Sim Out RTW thetaz Environment Controller ddot dot k /Jw z constant /virtual inertia z Out Haptic Wheel Angle (degrees) Read Wheel Angle b damping Figure 4: Inside the Triggered Subsystem block from Figure 3 7
8 updated. Similarly, the C code generated by Real-Time Workshop from a Simulink diagram must also take the flow of execution into account. To see the order in which Simulink will update each block in a diagram, enable the option Format/Block Displays/Sorted Order. The result of doing so for the simple diagram in Figure is displayed in Figure 5. Note there are two numbers on each block: the first indicates subsystem number (in this case there is only one subsystem), the second refers to the order that the block is executed inside that subsystem. 0:7 0:8 reaction torque (N mm) 0:0 Step in wheel (degrees) thetaz 0: k 0:3 constant 0:6 /Jw ddot 0:9 /virtual inertia dot 0:4 z 0: z 0:5 b damping Figure 5: Discrete Simulation of Virtual Wheel with Sorted Blocks. (virtual wheel discrete sort.mdl). It is instructive to work around the diagram in Figure 5 to determine the reasons for the specified block sorting. Keep in mind that Simulink sorts blocks according to the following two principles, paraphrased from pp from Chapter 4 of the Simulink user s guide [4]: During each time step of the simulation, a given block must be evaluated before any other block whose output at that time step depends upon the output of the given block at the same time step. Blocks whose outputs at a given time step depend only upon past inputs and initial conditions can be evaluated in any order consistent with the previous principle. For example, in Figure 5, the output of the step block and the rightmost discrete integrator block must be evaluated before the output of the leftmost summing block can be computed. 6 Simulation vs. Real Time Execution There are important differences between general Simulink simulations that we have been doing throughout the semester, and embedded software that must execute in real time. These differences are important to consider when setting up a Simulink model for code generation. A Simulink simulation does not need to evolve in real time. For example, it does not take precisely 0 seconds to simulate 0 seconds of the behavior of the system in Figure. The reason is that, between each two simulation time steps, all the computations required to update the model must be completed. If these computations are relatively simple, they will not take the entire time interval to complete, and the simulation can run faster than real time. On the other hand, if the computations are complex and time consuming, they may take longer than one time step to complete, in which case the simulation runs slower than real time. If all we care about is the correct result at the end of the simulation, then the difference between real time and time taken to perform the simulation computations does not matter. Simulations that must interact with the physical world, such as the virtual worlds we implement on the MPC5553 which must interact with a human user through the haptic interface, must evolve precisely in real time. This means that if the computations required to update the simulation are completed relatively quickly, then the processor is idle for the rest of the time interval between simulation updates. On the other hand, lengthy computations may take longer than the simulation time step, thus preventing the simulation from executing in real time. To minimize the risk of this happening, it is sometimes necessary to break a simulation down into multiple subsystems that contain dynamics that evolve at different rates. A subsystem 8
9 with fast dynamics must be updated at a faster rate than a subsystem with much slower dynamics. As we shall see in Section 7, it is possible to perform such a multi-rate simulation in Simulink. There are some subtleties that arise when performing multirate simulations, and we shall also discuss these in Section 7. When code is generated for a multirate simulation, Real-Time Workshop does either one of two things. If a real time operating system (RTOS) is available, such as OSEKturbo, then each subsystem is implemented as a separate task in the RTOS, with faster tasks given higher priority. If an RTOS is not available, then multi-tasking is simulated using nested interrupts in a procedure call pseudo-multitasking. Although the generated code is different in each case, the simulations will yield equivalent results. Multitasking and pseudo-multitasking are discussed in Chapter 8 of the User Guide for Real-Time Workshop [3]. One issue that arises when a simulation is broken into multiple tasks is that of guarding the integrity of any data that must be shared between the tasks. This is done through the use of rate transition blocks, which we shall illustrate in Section 7. 7 Two Virtual Spring Inertia Damper Systems The Simulink model developed in Section 5 is relatively straightforward and makes little use of the flexibility afforded by a real time operating system. Let us now consider a more complex virtual world that naturally suggests a multi-tasking software architecture. Specifically, we consider a virtual world consisting of dynamical subsystems with very different time constants. It is natural to simulate these subsystems with separate tasks that execute at different rates. Compare with the discussion of hardware-in-the-loop testing in [7]. Consider a virtual world consisting of two virtual wheels connected to the haptic wheel with virtual torsional s and dampers. A continuous time Simulink model of such a system is shown in Figure 6. The parameter values for the two virtual inertias and s have been chosen so that the frequency of oscillation of one subsystem is ten times that of the other. Suppose that we move the haptic wheel 45 and hold it in this position. Then we will experience the restoring torque plotted in Figure 7. Haptic Wheel Position fast subsystem 8 torque 7 angular speed Step thetaz thetaz k constant /Jw /virtual inertia ddot s 3 dot s 6 Virtual Wheel Position Scope total reaction torque slow subsystem 5 torque 4 angular speed k constant /Jw /virtual inertia ddot s dot s 3 Virtual Wheel Position Figure 6: Continuous time model of two virtual wheels (two virtual wheels analog.mdl) Although it should not matter for this relatively simple model, for more complex models there is an advantage to separate the slower and faster dynamics before implementing this model on the microprocessor. The faster portion of the model must be implemented with a smaller time step for numerical integration than that used for the slower portion of the model. There is no need to numerically integrate the slower dynamics at the fast rate, and doing so has the disadvantages of increasing computation time needlessly and perhaps causing numerical roundoff errors to accumulate. Motivated by the preceding discussion, we consider a discrete time simulation of this system using multiple sample rates: a slow sample rate is used for the slow dynamics and a faster rate for the fast dynamics. The 9
10 000 reaction torque (analog model) time, seconds Figure 7: Restoring torque in response to a step change in haptic wheel position (two virtual wheel plots.m) model also includes damping to counteract the destabilizing effects of the forward Euler integration. The resulting model is shown in Figure 8. Displaying Sample Time Colors It is often convenient to display subsystems executing at different rates in different colors. To do so, select the option Format/Port/Signal Displays/Sample Time Colors. Rate Transition Blocks An important feature of the Simulink diagram in Figure 8 is the presence of rate transition blocks connecting the fast and slow subsystems of the simulation. The purpose of these blocks differs depending on whether they are being used in a Simulink simulation, which need not execute in real time, or for autocode generation, which does have real time constraints. When used for simulation, the blocks insure that different parts of the simulation are evaluated in the proper order (recall our discussion of sorted ordering at the close of Section 5). When used for autocode generation, the rate transition blocks are used to achieve integrity and determinism of data transfers between those parts of the generated code that must execute at different rates. To explain further, consider what happens when a fast subsystem produces data that is used by a slow subsystem. If the computations required to update the slow subsystem cannot be completed before the fast subsystem must execute again, the output of the fast subsystem will have changed when the slow subsystem resumes execution, and these different values of data may result in an incorrect update to the slow subsystem. To prevent this from happening, the rate transition block acts like a sample and zero order hold operating at the slow period, thus insuring that all calculations required to update the slow subsystem are performed using the value of the fast subsystem output at the beginning of the slow subsystem update. (It is assumed that the update times for each subsystem are sufficiently long that all calculations can be completed required to update a given subsystem can be completed before the next update of that subsystem is required.) Consider next what happens when a slow subsystem produces data that is used by a fast subsystem. If the slow subsystem takes longer to update than the time interval between fast subsystem updates, then the fast subsystem may read data in the process of being changed, leading to incorrect results. Moreover, even 0
11 8 haptic wheel position fast subsystem 7 second (fast) virtual wheel torque 6 second (fast) virtual wheel speed thetaz k constant /Jw thetaddot /virtual inertia z 3 thetadot z theta 5 second (fast) virtual wheel position b damping4 Scope 4 reaction torque /z Step Rate Transition /z Rate Transition4 3 first (slow) virtual wheel torque /z Rate Transition3 first (slow) virtual wheel speed thetaz ZOH Rate Transition slow subsystem k constant thetaddot /Jw /virtual inertia z thetadot z theta /z first (slow) virtual Rate Transition wheel position b damping Figure 8: Discrete time model of two virtual wheels (two virtual wheels discrete.mdl). if the data is transferred correctly, the timing of the transfer may vary, with the result that it is not possible to know exactly when the fast subsystem will begin to use the new data from the slow subsystem. To resolve these issues, a rate transition block will effectively act like a delay equal to one slow update period. Hence the fast subsystem will always work with a value of the slow subsystem that is delayed by one slow update period. The latency introduced in slow to fast data transfers described in the preceding paragraph is the price paid to insure deterministic transfer timing. It is possible to configure a rate transition block so that date protection and/or deterministic data transfer are turned off. In these cases, the generated C code will require less memory and execute more quickly, with the downside that unpredictable results may occur. See Chapter 6 of the Real Time Workshop documentation [3] for more information. 8 Code Generation for the Two Inertia System It is necessary to modify the Simulink model in Figure 8 if we are to use it for autocode generation. The reason is that different parts of the model are simulated at different rates, and the C code generated from this model must execute at corresponding rates. There are two approaches to autocode generation with different execution rates, depending on whether or not an RTOS is present. We now illustrate both these approaches. Consider the Simulink diagram in Figure 9. In this diagram, each of the virtual wheel subsystems is implemented in a Triggered Subsystem block that responds to a periodic function call generator, thus providing the block with a sample period. Inside each triggered subsystem block is one of the virtual wheel subsystems: the slow block contains the subsystem shown in Figure, and the fast block contains the subsystem shown in Figure 0. The Simulink diagram in Figure 9 is used only for simulation, and is functionally equivalent to that in Figure 8. In Sections 8. and 8. we show how to modify these diagrams for the purpose of code generation, both without an RTOS and with an RTOS, respectively.
12 Function Call Generator Trigger() Virtual wheel Position theta angular speed torque Scope Fast System Step Triggered Subsystem: Small Inertia (Fast Subsystem) Function Call Generator Trigger() Virtual wheel Position Gain Scope Reaction torque ZOH theta angular speed Rate Transition torque Scope Slow System Triggered Subsystem: Large Inertia (Slow Subsystem) /z Rate Transition Figure 9: Two virtual wheels implemented as triggered subsystems (two virtual wheel subsystems.mdl). 3 torque theta k constant Trigger ddot /Jw z /virtual inertia 3 dot z angular speed Virtual wheel Position b damping Figure 0: Fast triggered subsystem from Figure 9. theta k constant Trigger /Jw /virtual inertia ddot z dot z 3 torque angular speed Virtual wheel Position b damping Figure : Slow triggered subsystem from Figure 9.
13 8. Without an RTOS Now that the two virtual wheel system has been separated into separate subsystems, we must add initialization and device driver blocks. The resulting model is shown in Figures -4. The processor and peripheral initialization block has been placed at the highest level of the model. The device driver blocks are placed inside the fast subsystem, so that the encoder is read and the duty cycle is updated at the fast rate. Note that the torque computed by the slow subsystem must be passed to the fast subsystem, so that the latter may compute the total reaction torque used to update the duty cycle. Similarly, the angle of the haptic wheel, which is obtained from the etpu driver block in the fast subsystem, must be passed to the slow task so that the latter may use this information to compute the reaction torque for the virtual wheel with the larger inertia. RAppID MPC5554 Target Setup System Clock : 8 MHz Target : MPC5554 Compiler : metrowerks Target Type : IntRAM Operating System : simpletarget RAppID EC 0: fcn_call Fast Task Trigger Trigger() 0:F{} Haptic Wheel Position Slow Torque fast virtual wheel position FastTask /z 0: SlowTqFastTask WheelPosSlowTask ZOH 0:6 /z0:4 Display Rate Transition 0:5 () Scope 0:7 fcn_call Slow Task Trigger Trigger() 0:F{} Slow Torque Haptic Wheel Position slow virtual wheel position SlowTask Figure : Highest Level of the Two Virtual Spring Inertia Damper System (two virtual wheels.mdl) Slow Torque Fast Torque (N mm) Slow Reaction Torque Fast Reaction Torque Reaction Torque Write Reaction Torque Trigger k constant Fast Torque (N mm) /Jw /virtual inertia ddot z dot z fast virtual wheel position b damping Convert 5 deg at sec Sim Out RTW Environment Controller Haptic Wheel Angle (degrees) Haptic Wheel Position 6 bit value Write 6 Bits Read Wheel Angle Figure 3: Fast triggered subsystem for autocode generation from Figure. 3
14 Trigger Slow Torque Haptic Wheel Position : :6 : :5 ddot :3 :0 dot k /Jw Slow Torque (N mm) z z constant /virtual inertia b :4 damping slow virtual wheel position Figure 4: Slow triggered subsystem for autocode generation from Figure. 8. With an RTOS If the OSEKturbo RTOS is present and selected on the initialization block, the generated code is structured as two tasks in the operating system, with the task corresponding to the fast subsystem having higher priority. The data shared between these tasks is protected by the priority ceiling protocol used in OSEK/VDX compliant operating systems. If there is no RTOS available, then the code for each subsystem is executed in interrupt routines, with the fast subsystem having higher priority, and data integrity is achieved by transferring the data at appropriate times. Figure 5 shows the top level of the block diagram for code generation with an RTOS present. As in Figure, the fast and slow subsystems are separated into triggered subsystems. However, the flow if execution in the generated code is now controlled by the OSEKturbo task scheduler, with the faster subsystem receiving the higher priority. Data shared between tasks is passed back and forth through Resource Allocation blocks. These blocks implement the priority ceiling protocol discussed in class. RAppID MPC 5554 Target Setup Resource Initialization Resource Initialization System Clock : 8 MHz Target : MPC5554 Compiler : metrowerks Target Type : IntRAM Operating System : osekturbo Resource Name : Torque Resource Type : STANDARD Signal Type : Single Vector Size : The University of Michigan Resource Name : Encoder _ticks Resource Type : STANDARD Signal Type : Single Vector Size : The University of Michigan Resource Initialization Signal Object Resource Initialization Signal Object RAppID EC Function Call Generator Function Call Generator Trigger() torque 3 Trigger() torque 3 Slow System Triggered Subsystem angular speed 3 virtual wheel position 3 Slow System Scope Fast System Triggered Subsystem angular speed 3 virtual wheel position 3 Fast System Scope Figure 5: Highest Level of the Two Virtual Spring Inertia Damper System for Code Generation with an RTOS 4
15 Trigger torque3 angular speed 3 deg reads encoder, converts to degs thetaz k constant /Jw b thetaddot /virtual inertia 3 z 6 thetadot z 5 theta 3 virtual wheel position 3 Gain torque takes torque, outputs pwm damping Write Resource Read Resource Input Resource Name:Encoder_ticks The University of Michigan WriteToResource Output Resource Name:Torque The University of Michigan ReadFromResource Figure 6: Fast triggered subsystem for autocode generation from Figure 5. Trigger Write Resource Input Resource Name :Torque torque 3 The University of Michigan WriteToResource angular speed 3 Read Resource theta z Output Resource Name :Encoder _ticks The University of Michigan ReadFromResource k constant 3 /Jw b theta ddot /virtual inertia 3 z 6 theta dot z 5 theta 3 virtual wheel position 3 damping Figure 7: Slow triggered subsystem for autocode generation from Figure 5. 5
16 References [] OSEK. [] summary.jsp?code=rappidtoolbox. [3] doc/rtw/rtw\ ug.pdf. [4] doc/simulink/sl\ using.pdf. [5] [6] [7] J. A. Ledin. Hardware-in-the-loop simulation. Embedded Systems Programming, pages 4 60, February
Lab 4: Pulse Width Modulation and Introduction to Simple Virtual Worlds (PWM) (PWM)
1 Lab 4: Pulse Width Modulation and Lab 4: Pulse Width Modulation and Introduction to Simple Virtual Worlds Introduction to Simple Virtual Worlds (PWM) (PWM) Virtual Spring and Virtual Wall 2 Virtual Spring
DS1104 R&D Controller Board
DS1104 R&D Controller Board Cost-effective system for controller development Highlights Single-board system with real-time hardware and comprehensive I/O Cost-effective PCI hardware for use in PCs Application
A Master-Slave DSP Board for Digital Control
A Master-Slave DSP Board for Digital Control ROSA, F. E. 1 ; CARRARA, A. R. S. 2 ; SOUZA, A.H. 3 (1) M.Sc. candidate e-mail [email protected] (2) Professor, Ph.D. e-mail [email protected]
ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation
ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation Program Definition: Write a program to control the speed of a dc motor using pulse width modulation. Discussion: The speed of a dc motor is
Digital Signal Controller Based Automatic Transfer Switch
Digital Signal Controller Based Automatic Transfer Switch by Venkat Anant Senior Staff Applications Engineer Freescale Semiconductor, Inc. Abstract: An automatic transfer switch (ATS) enables backup generators,
STEPPER MOTOR SPEED AND POSITION CONTROL
STEPPER MOTOR SPEED AND POSITION CONTROL Group 8: Subash Anigandla Hemanth Rachakonda Bala Subramanyam Yannam Sri Divya Krovvidi Instructor: Dr. Jens - Peter Kaps ECE 511 Microprocessors Fall Semester
The Virtual Spring Mass System
The Virtual Spring Mass Syste J. S. Freudenberg EECS 6 Ebedded Control Systes Huan Coputer Interaction A force feedbac syste, such as the haptic heel used in the EECS 6 lab, is capable of exhibiting a
dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor
dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor Jaswandi Sawant, Divyesh Ginoya Department of Instrumentation and control, College of Engineering, Pune. ABSTRACT This
Timer A (0 and 1) and PWM EE3376
Timer A (0 and 1) and PWM EE3376 General Peripheral Programming Model Each peripheral has a range of addresses in the memory map peripheral has base address (i.e. 0x00A0) each register used in the peripheral
CHAPTER 3 Boolean Algebra and Digital Logic
CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4
Basic Pulse Width Modulation
EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 [email protected] 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power
OPC COMMUNICATION IN REAL TIME
OPC COMMUNICATION IN REAL TIME M. Mrosko, L. Mrafko Slovak University of Technology, Faculty of Electrical Engineering and Information Technology Ilkovičova 3, 812 19 Bratislava, Slovak Republic Abstract
150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
DCMS DC MOTOR SYSTEM User Manual
DCMS DC MOTOR SYSTEM User Manual release 1.3 March 3, 2011 Disclaimer The developers of the DC Motor System (hardware and software) have used their best efforts in the development. The developers make
Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com
Best Practises for LabVIEW FPGA Design Flow 1 Agenda Overall Application Design Flow Host, Real-Time and FPGA LabVIEW FPGA Architecture Development FPGA Design Flow Common FPGA Architectures Testing and
Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan
Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software
MACHINE ARCHITECTURE & LANGUAGE
in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based
(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2
Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of
3. Programming the STM32F4-Discovery
1 3. Programming the STM32F4-Discovery The programming environment including the settings for compiling and programming are described. 3.1. Hardware - The programming interface A program for a microcontroller
The Real-Time Operating System ucos-ii
The Real-Time Operating System ucos-ii Enric Pastor Dept. Arquitectura de Computadors µc/os-ii Overview µc/os-ii Task Management Rate Monotonic Scheduling Memory Management µc/gui µc/fs Books and Resources
PowerPC Microprocessor Clock Modes
nc. Freescale Semiconductor AN1269 (Freescale Order Number) 1/96 Application Note PowerPC Microprocessor Clock Modes The PowerPC microprocessors offer customers numerous clocking options. An internal phase-lock
Chapter 6: From Digital-to-Analog and Back Again
Chapter 6: From Digital-to-Analog and Back Again Overview Often the information you want to capture in an experiment originates in the laboratory as an analog voltage or a current. Sometimes you want to
HITACHI INVERTER SJ/L100/300 SERIES PID CONTROL USERS GUIDE
HITACHI INVERTER SJ/L1/3 SERIES PID CONTROL USERS GUIDE After reading this manual, keep it for future reference Hitachi America, Ltd. HAL1PID CONTENTS 1. OVERVIEW 3 2. PID CONTROL ON SJ1/L1 INVERTERS 3
Counters and Decoders
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter
Converting Models from Floating Point to Fixed Point for Production Code Generation
MATLAB Digest Converting Models from Floating Point to Fixed Point for Production Code Generation By Bill Chou and Tom Erkkinen An essential step in embedded software development, floating- to fixed-point
LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES
page 1/10 This document is designed as a quick-start primer to assist industrial automation programmers who are familiar with PLCs and Relay Ladder Logic programming to better understand the corresponding
Product Development Flow Including Model- Based Design and System-Level Functional Verification
Product Development Flow Including Model- Based Design and System-Level Functional Verification 2006 The MathWorks, Inc. Ascension Vizinho-Coutry, [email protected] Agenda Introduction to Model-Based-Design
An overview of Computerised Numeric Control (C.N.C.) and Programmable Logic Control (P.L.C.) in machine automation
An overview of Computerised Numeric Control (C.N.C.) and Programmable Logic Control (P.L.C.) in machine automation By Pradeep Chatterjee, Engine Division Maintenance, TELCO, Jamshedpur 831010 E-mail: [email protected]
2.0 Command and Data Handling Subsystem
2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation
TwinCAT NC Configuration
TwinCAT NC Configuration NC Tasks The NC-System (Numeric Control) has 2 tasks 1 is the SVB task and the SAF task. The SVB task is the setpoint generator and generates the velocity and position control
Flexible Active Shutter Control Interface using the MC1323x
Freescale Semiconductor Document Number: AN4353 Application Note Rev. 0, 9/2011 Flexible Active Shutter Control Interface using the MC1323x by: Dennis Lui Freescale Hong Kong 1 Introduction This application
Quiz for Chapter 6 Storage and Other I/O Topics 3.10
Date: 3.10 Not all questions are of equal difficulty. Please review the entire quiz first and then budget your time carefully. Name: Course: Solutions in Red 1. [6 points] Give a concise answer to each
EHOOKS Prototyping is Rapid Again
09CV-0113 EHOOKS Prototyping is Rapid Again Vivek Jaikamal ETAS Inc. Nigel Tracey ETAS Ltd. Copyright 2009 SAE International ABSTRACT Automotive controls engineers have traditionally used bypass rapid
Networking Remote-Controlled Moving Image Monitoring System
Networking Remote-Controlled Moving Image Monitoring System First Prize Networking Remote-Controlled Moving Image Monitoring System Institution: Participants: Instructor: National Chung Hsing University
Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer
Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, [email protected] School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.
Pulse Width Modulation
Pulse Width Modulation Pulse width modulation (PWM) is a powerful technique for controlling analog circuits with a microprocessor's digital outputs. PWM is employed in a wide variety of applications, ranging
Product Information CANape Option Simulink XCP Server
Product Information CANape Option Simulink XCP Server Table of Contents 1 Overview... 3 1.1 Introduction... 3 1.2 Overview of Advantages... 3 1.3 Application Areas... 3 1.4 Further Information... 4 2 Functions...
Exception and Interrupt Handling in ARM
Exception and Interrupt Handling in ARM Architectures and Design Methods for Embedded Systems Summer Semester 2006 Author: Ahmed Fathy Mohammed Abdelrazek Advisor: Dominik Lücke Abstract We discuss exceptions
Figure 1: Graphical example of a mergesort 1.
CSE 30321 Computer Architecture I Fall 2011 Lab 02: Procedure Calls in MIPS Assembly Programming and Performance Total Points: 100 points due to its complexity, this lab will weight more heavily in your
Work with Arduino Hardware
1 Work with Arduino Hardware Install Support for Arduino Hardware on page 1-2 Open Block Libraries for Arduino Hardware on page 1-9 Run Model on Arduino Hardware on page 1-12 Tune and Monitor Models Running
CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions
CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How
Pulse Width Modulation Applications
Pulse Width Modulation Applications Lecture 21 EE 383 Microcomputers Learning Objectives What is DTMF? How to use PWM to generate DTMF? How to use PWM to control a servo motor? How to use PWM to control
Freescale Semiconductor, I
nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development
Timer, Interrupt, Exception in ARM
Timer, Interrupt, Exception in ARM Modifications from Prabal Dutta, University of Michigan 1 Interrupts Merriam-Webster: to break the uniformity or continuity of Informs a program of some external events
2 Session Two - Complex Numbers and Vectors
PH2011 Physics 2A Maths Revision - Session 2: Complex Numbers and Vectors 1 2 Session Two - Complex Numbers and Vectors 2.1 What is a Complex Number? The material on complex numbers should be familiar
DAC Digital To Analog Converter
DAC Digital To Analog Converter DAC Digital To Analog Converter Highlights XMC4000 provides two digital to analog converters. Each can output one analog value. Additional multiple analog waves can be generated
A Practical Approach to Education of Embedded Systems Engineering
A Practical Approach to Education of Embedded Systems Engineering Özgür Yürür Department of Electrical Engineering University of South Florida Tampa, Florida, 33620 [email protected] Wilfrido Moreno
Tutorial for MPLAB Starter Kit for PIC18F
Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is
Controlling a Dot Matrix LED Display with a Microcontroller
Controlling a Dot Matrix LED Display with a Microcontroller By Matt Stabile and programming will be explained in general terms as well to allow for adaptation to any comparable microcontroller or LED matrix.
A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 1 Introducing Hardware Objectives Learn that a computer requires both hardware and software to work Learn about the many different hardware components
Real Time Development of MC Applications using the PC Master Software Visualization Tool. 1. Introduction. 2. Development of Motor Control.
Freescale Semiconductor Application Note AN1948 Rev. 1, 11/2005 Real Time Development of MC Applications using the PC Master Software Visualization Tool The PC Master Software Visualization Tool Simplifies
Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module
Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module RS0 Microcontroller LEDs Motor Control Pushbuttons Purpose: To demonstrate an easy way of using a Freescale RS0K2 microcontroller
Programming Logic controllers
Programming Logic controllers Programmable Logic Controller (PLC) is a microprocessor based system that uses programmable memory to store instructions and implement functions such as logic, sequencing,
CHAPTER 11: Flip Flops
CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach
Caterpillar Automatic Code Generation
SAE TECHNICAL PAPER SERIES 2004-01-0894 Caterpillar Automatic Code Generation Jeffrey M. Thate and Larry E. Kendrick Caterpillar, Inc. Siva Nadarajah The MathWorks, Inc. Reprinted From: Electronic Engine
PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1
UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 This work covers part of outcome 2 of the Edexcel standard module. The material is
MICROPROCESSOR AND MICROCOMPUTER BASICS
Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit
Op-Amp Simulation EE/CS 5720/6720. Read Chapter 5 in Johns & Martin before you begin this assignment.
Op-Amp Simulation EE/CS 5720/6720 Read Chapter 5 in Johns & Martin before you begin this assignment. This assignment will take you through the simulation and basic characterization of a simple operational
Optical Encoders. K. Craig 1. Actuators & Sensors in Mechatronics. Optical Encoders
Any transducer that generates a coded reading of a measurement can be termed an encoder. Shaft Encoders are digital transducers that are used for measuring angular displacements and velocities. Relative
Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales Missile Electronics. Missile Electronics
Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales 2 Contents Who are we, where are we, what do we do Why do we want to use Model-Based Design Our Approach to Model-Based
TIMING DIAGRAM O 8085
5 TIMING DIAGRAM O 8085 5.1 INTRODUCTION Timing diagram is the display of initiation of read/write and transfer of data operations under the control of 3-status signals IO / M, S 1, and S 0. As the heartbeat
How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.
1 How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc. The territory of high-performance motor control has
Embedded OS. Product Information
Product Information Table of Contents 1 Operating Systems for ECUs... 3 2 MICROSAR.OS The Real-Time Operating System for the AUTOSAR Standard... 3 2.1 Overview of Advantages... 3 2.2 Properties... 4 2.3
Massachusetts Institute of Technology
Objectives Massachusetts Institute of Technology Robotics: Science and Systems I Lab 1: System Overview and Introduction to the µorcboard Distributed: February 4, 2015, 3:30pm Checkoffs due: February 9,
Using Arduino Microcontrollers to Sense DC Motor Speed and Position
ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------
what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?
Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the
Power inverters: Efficient energy transformation through efficient TargetLink code
Page 6 santerno Power inverters: Efficient energy transformation through efficient TargetLink code Upva page 7 lue Energy Every day, the amount of energy delivered by the sun is 15,000 times the current
Pulse Width Modulated (PWM)
Control Technologies Manual PWM AC Drives Revision 1.0 Pulse Width Modulated (PWM) Figure 1.8 shows a block diagram of the power conversion unit in a PWM drive. In this type of drive, a diode bridge rectifier
STEREO Guidance & Control
STEREO Guidance & Control J. Courtney Ray [email protected] J. C. Ray 98/11/19 1 STEREO G&C Requirements Baseline System Software Some Analysis J. C. Ray 98/11/19 2 G&C Requirements - Drivers Spacecraft
S7 for Windows S7-300/400
S7 for Windows S7-300/400 A Programming System for the Siemens S7 300 / 400 PLC s IBHsoftec has an efficient and straight-forward programming system for the Simatic S7-300 and ern controller concept can
Lab 1 Course Guideline and Review
Lab 1 Course Guideline and Review Overview Welcome to ECE 3567 Introduction to Microcontroller Lab. In this lab we are going to experimentally explore various useful peripherals of a modern microcontroller
Pulse Width Modulated (PWM) Drives. AC Drives Using PWM Techniques
Drives AC Drives Using PWM Techniques Power Conversion Unit The block diagram below shows the power conversion unit in Pulse Width Modulated (PWM) drives. In this type of drive, a diode bridge rectifier
Introduction to Xilinx System Generator Part II. Evan Everett and Michael Wu ELEC 433 - Spring 2013
Introduction to Xilinx System Generator Part II Evan Everett and Michael Wu ELEC 433 - Spring 2013 Outline Introduction to FPGAs and Xilinx System Generator System Generator basics Fixed point data representation
Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:
PS-2 Mouse: The Protocol: For out mini project we designed a serial port transmitter receiver, which uses the Baud rate protocol. The PS-2 port is similar to the serial port (performs the function of transmitting
MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN. [email protected]. [email protected]
MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN Zheng Lai Zhao Liu Meng Li Quan Yuan [email protected] [email protected] [email protected] [email protected] I. Overview Architecture The purpose
MicroMag3 3-Axis Magnetic Sensor Module
1008121 R01 April 2005 MicroMag3 3-Axis Magnetic Sensor Module General Description The MicroMag3 is an integrated 3-axis magnetic field sensing module designed to aid in evaluation and prototyping of PNI
Transmitter Interface Program
Transmitter Interface Program Operational Manual Version 3.0.4 1 Overview The transmitter interface software allows you to adjust configuration settings of your Max solid state transmitters. The following
Optimizing VCO PLL Evaluations & PLL Synthesizer Designs
Optimizing VCO PLL Evaluations & PLL Synthesizer Designs Today s mobile communications systems demand higher communication quality, higher data rates, higher operation, and more channels per unit bandwidth.
Central Processing Unit
Chapter 4 Central Processing Unit 1. CPU organization and operation flowchart 1.1. General concepts The primary function of the Central Processing Unit is to execute sequences of instructions representing
DEVELOPMENT OF DEVICES AND METHODS FOR PHASE AND AC LINEARITY MEASUREMENTS IN DIGITIZERS
DEVELOPMENT OF DEVICES AND METHODS FOR PHASE AND AC LINEARITY MEASUREMENTS IN DIGITIZERS U. Pogliano, B. Trinchera, G.C. Bosco and D. Serazio INRIM Istituto Nazionale di Ricerca Metrologica Torino (Italia)
Keil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
Performance Comparison of RTOS
Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile
Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic
Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1
DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION
DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION Introduction The outputs from sensors and communications receivers are analogue signals that have continuously varying amplitudes. In many systems
Chapter 1 Computer System Overview
Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides
A highly integrated UAV avionics system 8 Fourth Street PO Box 1500 Hood River, OR 97031 (541) 387-2120 phone (541) 387-2030 fax CCT@gorge.
A highly integrated UAV avionics system 8 Fourth Street PO Box 1500 Hood River, OR 97031 (541) 387-2120 phone (541) 387-2030 fax [email protected] Bill Vaglienti Ross Hoag April 10, 2003 Table of contents
Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0
ounter ounters ounters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle.
COMPUTER SCIENCE AND ENGINEERING - Microprocessor Systems - Mitchell Aaron Thornton
MICROPROCESSOR SYSTEMS Mitchell Aaron Thornton, Department of Electrical and Computer Engineering, Mississippi State University, PO Box 9571, Mississippi State, MS, 39762-9571, United States. Keywords:
ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER
ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER Pierre A. von Kaenel Mathematics and Computer Science Department Skidmore College Saratoga Springs, NY 12866 (518) 580-5292 [email protected] ABSTRACT This paper
EE 402 RECITATION #13 REPORT
MIDDLE EAST TECHNICAL UNIVERSITY EE 402 RECITATION #13 REPORT LEAD-LAG COMPENSATOR DESIGN F. Kağan İPEK Utku KIRAN Ç. Berkan Şahin 5/16/2013 Contents INTRODUCTION... 3 MODELLING... 3 OBTAINING PTF of OPEN
THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals
THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals Full Marks 100 (Theory 75, Practical 25) Introduction to Computers :- What is Computer?
NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter
NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter Description: The NTE2053 is a CMOS 8 bit successive approximation Analog to Digital converter in a 20 Lead DIP type package which uses a differential
AC/DC Power Supply Reference Design. Advanced SMPS Applications using the dspic DSC SMPS Family
AC/DC Power Supply Reference Design Advanced SMPS Applications using the dspic DSC SMPS Family dspic30f SMPS Family Excellent for Digital Power Conversion Internal hi-res PWM Internal high speed ADC Internal
Operating Systems 4 th Class
Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science
Model Based System Engineering (MBSE) For Accelerating Software Development Cycle
Model Based System Engineering (MBSE) For Accelerating Software Development Cycle Manish Patil Sujith Annamaneni September 2015 1 Contents 1. Abstract... 3 2. MBSE Overview... 4 3. MBSE Development Cycle...
CONTROL CODE GENERATOR USED FOR CONTROL EXPERIMENTS IN SHIP SCALE MODEL
CONTROL CODE GENERATOR USED FOR CONTROL EXPERIMENTS IN SHIP SCALE MODEL Polo, O. R. (1), Esteban, S. (2), Maron, A. (3), Grau, L. (4), De la Cruz, J.M. (2) (1) Dept Arquitectura de Computadores y Automatica.
Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM
Freescale Semiconductor Document Number:AN4642 Application Note Rev. 1, 01/2013 Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM by: Marek Stulrajter, Pavel Sustek 1 Introduction This application
8051 MICROCONTROLLER COURSE
8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:
