Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer only part 4.1. All reference material I have has been provided below. Thank you for your help! Lab 3: Quanser Hardware and Proportional

Please answer only part 4.1. All reference material I have has been provided below. Thank you for your help!

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Lab 3: Quanser Hardware and Proportional Control "The worst wheel of the cart makes the most noise. " - Benjamin Franklin 1 Objectives The goal of this lab is to: 1. familiarize you with Quanser's QuaRC tools and the Q4/Q2-usb Data Acquisition (DAQ) board. 2. derive and understand a model for the dynamics of the cart (without the pendulum). 3. use proportional control to generate a step response on the actual hardware. 2 Equipment Cart system (no attachments), Quanser Q4/Q2-usb DAQ board w/ terminal board, amplifier and ca- bles. The terminal board in Figure 1 provides connectors for the inputs and outputs of the Q4/Q2-ush DAQ boards in the computers. Specifically, you will use a single analog output (this will provide the motor voltage) and two encoder inputs (for cart position and pendulum angle). Since the analog out ports of the Quanser Q4/Q2-usb board are not powerful enough to drive the DC motor on the cart, the signal needs to be amplified (in fact, the gain will be unity, but the amplifier can provide much higher currents than the DAQ boards). Figure 2 shows the amplifier that drives the DC motor on the cart. In all of the coming labs, you will only use the ports "From analog output (D/A)" and "To Motor". The cables we use are special cables that have resistors between the connector ports built in so that the connection results in the correct op-amp circuit. The GSI will give you a demo on how to properly connect terminal board, amplifier and cart. O Figure I: Terminal board of the Quanser Q4 DAQ cardME C134 / EE C12 Spring 2123 Lab 3 UC Berkeley Sensor bias From and sensors measurement to analog inputs (A/D) To Motor From analog output (D/A) Figure 2: Amplifier for the cart's DC motor 3 Theory 1.1 Simulink Coder, QuaRC, and the Q4 DAQ board MATLAB's Simulink Coder (formerly Real Time Workshop) generales and executes C and C+ code From Simulink diagrams, Stateflow charts, and MATLAB functions. The generated source code can be used for real-time and nonreal-time applications, including simulation acceleration, rapid prototyping, and hardware in the loop testing. QuaRC is Quanser's rapid prototyping and production system for real-lime control. QuaRC integrates seamlessly with Simulink to allow Simulink models to be run in real-time on Windows. It uses a hoed and arget relationship that allows code generation and execution to occur on separate machines. However, we will be using QuaRC in "Single User Mode" or "Local Configuration", where we will be generating and executing code on the same computer, as shown in Figure 3. The QuaRC Simulink Development Environment (SDE) is used to generale/build code to be later run on real-time target from MATLAB/Simulink models. The QuaRC Windows Target feature is required to un the generated code from MATLAB/Simulink models on a real-Lime Windows target (local or remote). QuaRC Windows Target needs to be open to run any QuaRC generated code. While interesting, understanding the details of the implementation of the QuaRC software is not the ocus of this lab. Your task is to design the controller based on either classic or state space techniques. Then you will implement the controller in Simulink. This is then downloaded to the QuaRC Largely which interfaces the plant through the Q4 DAQ board. This board supports 4 A/D converters, 4 D/A converters, 16 Digital 1/Os, 2 Realtime clocks, and up to 4 Quadrature input decoders/counters. The Q4 board's functionality has also been aletracted from the user. The board has been set up to work with be cart and pendulum for all stations.ME C134 / EE C128 Spring 2023 Lab 3 UC Berkeley Same Machine Quarc Target Quare Host quare Tarqui Manager PLANT - DACE USER Simulink Mindal Diagram/ Quare Menu Operating System Figure 3: "Local Configuration" - QuaRC Host and Target on the same PC Important: Do not change any of the hardware of the Quanser stations without first con- sulting the GSI! Also, make sure you get permission from one of the GSIs before working on the hardware outside regular section times. 3.2 Dynamics of the Cart Figure 4 shows a picture of the cart used in the lab setup for the pendulum experiments. The main components are the Cart motor pinion (5) with attached GV DC motor and gearbox (not visible in the figure), the Cart position pinion (4) with attached encoder (8) and the pendulum axis (7) with attached encoder (9). Warning: The motor pinion is the weakest part of the setup and can easily be damaged by high torque values, so be careful when running a controller on the hardware. Always start with less aggressively tuned controllers first if possible. 10 6 3 Figure 4: Quanser IP02 cart Figure 5 shows the cart's free body diagram. For simplicity, we will ignore the clfects of friction. In theME C134 / EE C128 Spring 2023 Lab 3 UC Berkeley diagram, a is the input force exerted on the cart by the voltage applied to the motor, my is the mass of the cart. The encoder is used to keep track of the position of the cart on the track. Can Encoder Track Motor X Figure 5: Free body diagram of the cart (ignoring friction) Using Figure 5 and basic Newtonian dynamics you can derive the equations governing the system. 3.3 Motor Dynamics The input to your system is actually a voltage to the cart's motor. Thus, you need to derive the dynamics of the system that converts the input voltage to the force exerted on the cart. These are the dynamics of the motor. Figure 6 shows a diagram of the electrical components of the motor. Figure 6: Classic armature circuit of a standard DC motor For this derivation of the motor dynamics we assume the following: . We disregard the motor inductance: Im

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Unifying The Universe The Physics Of Heaven And Earth

Authors: Hasan S Padamsee

2nd Edition

0429754922, 9780429754920

More Books

Students also viewed these Physics questions

Question

=+Is this metric really applicable to what I want to accomplish?

Answered: 1 week ago

Question

=+How does this metric connect to my objectives?

Answered: 1 week ago