RTA Laboratory Information 2017:

**** Experiment Procedure Updates (1/10/17) ****
(Empty browser cache to get latest updates.)

 

EXPERIMENT PROCEDURE NOTES:

 

Check for the latest versions of lab programs on http://www.ecse.rpi.edu/courses/CStudio/RTA_lab/

 

1. Digital Logic and Graphics Simulation teams are not required to attend lab every day to complete those experiments if they have access to LogicWorks (DesignWorks) and MATLAB elsewhere. However the Digital Logic Design final project must be demonstrated in class for the TA. New, starting in 2011, is the requirement that the state machine (EXPERIMENTAL PROCEDURE - Questions and Problems - item 6) must be implemented on the UP1 FPGA board in real-time, not just simulated in LogicWorks. The project should also be implemented on the UP1, but in cases were there are not enough gates in the FPGA, a LogicWorks simulation is acceptable. There is a tutorial for using the Altera UP1 board on the web and a demonstration circuit to jumpstart the FPGA design process. A warning about the most recent version of LogicWorks: it may not default to gate delays of zero. If you are getting glitches and race conditions in your logic circuits it is acceptable to just shorten or remove all gate delays for this lab.

 

2. The PC program for the Voice Processing/Delta Modulator experiment is available for WindowsXP. Use EVM30XW.EXE version 3.31 (8/03/01) on F:. The program may have problems loading voicedlt.cld and the only solution seems to be to quit the program, cycle the power on the DSP EVM, and try again. In spite of all efforts, the ProComm com port may need to be changed to something other than 2 or 5 to communicate with the EVM. Check with the TAs if you are having trouble. This program runs on all the PCs. Along with the DSP implementation, a MATLAB simulation M-file is available with the course handouts, which graphs an idealized delta modulation output for a sine wave input. This is especially helpful in understanding how the output voltages are created and clearly observed without the effects of the DSP's built-in DC block and LPF. The simulation permits full flexibility in setting the A, B, C, & D parameters shown in FIGURE 12 even though the DSP program implementation places constraints on what values are allowed.

 

Special cables are needed for the DSP boards. There are a number of ways to go from 1/8" stereo to BNC connector cables in the studio and you must understand what each does. The most reliable involves a small box with a stereo plug on one side (labeled "3.5 mm stereo") and 2 BNC connectors on the other (labeled "Left" and "Right"). Use a cable with stereo jacks on each end with the box to convert to BNC. The other prepared cables are described next, but be aware that they have reliability issues. The single BNC to stereo cables with red or white tape on them will feed a BNC signal to ONLY the right channel (red tape) or left channel (white tape) or receive ONLY the right or left output respectively and pass it to the BNC connector. If you feed a right channel signal into the DSP you must watch a right channel output to see anything. There are also similarly looking cables with both red and white tape on them. These are for INPUT ONLY and feed the BNC signal to both the left and right channel 1/8" stereo plug on the DSP. The last cable is a splitter that connects both channels from the 1/8" stereo output to two separate BNC connectors. This may be used for either input or output. The red tape indicates the right channel and the white tape the left channel on the BNC connectors. There are several ways the cables may be used, BUT you must be consistent in order to see working signals from the DSP boards.

 

3. The Binary Communications program requires a real PC and runs best in DOS only mode, but will work in Windows98. Use the PCs labeled "DOS mode only - Bin Comm". WindowsXP however will NOT work. Make sure you run the 6/29/05 version of the executable. The 1998 version doesn't work properly. Use the small gray BNC input box, not the NI BNC-2110 box. 4-channel scopes are available for this experiment allowing the viewing of the 2 inputs and 2 outputs simultaneously.

 

4. The new Digital Filtering experiment procedure uses a Speedy-33 DSP from National Instruments (Hyperception subsidiary). A quick introduction to the tool you will be using is at http://www.youtube.com/samshearman#p/a/u/2/rg1GTmpPYd8. This is worth watching before attempting to use the tool to design filters. The video starts from a blank VI but we have provided a block diagram. It is only necessary to open the block diagram window and click on the filter design block to begin the design. Be sure to use the latest VI programs available on http://www.ecse.rpi.edu/courses/CStudio/RTA_lab/Digital_Filter. Only download a file that has a newer date in its name. Both Create_Filter & DFD_Implementation will be used. The "plots" and "no plots" versions of DFD are there because at high sampling (>24kHz) the DSP can't keep up. The "no plots' version reduces the workload by eliminating some output plots.

 

The function to convert MATLAB filter designs into FDS files to run on the Speedy-33 DSP DOES NOT WORK with the current LabVIEW version. Instead of implementing them on the DSP and evaluating their performance, use MATLAB response plots (frequency sweeps and time domain plots for selected input waveforms) to verify the operation of the designs.

 

WARNING! Due to LabVIEW problems, permanent files for this lab can't be properly protected. You are asked to NEVER save any VIs or LVPROJs when leaving LabVIEW, otherwise the programs will stop working and you will be unable to finish the experiment. The ONLY files you are permitted to save are the .fds & .txt files for the filters you create when you run the Create_Filter.vi. These files should be given unique names so you will be able to identify them. Also running Create_Filter.vi and Execute_Filter.lvproj by double-clicking them will display an error message (which may be ignored). To avoid the error, start LabVIEW from the "Start" menu and then select the VI or LVPROJ from the open instance window that comes up (eventually).

 

Special cables are needed for the DSP boards. There are a number of ways to go from 1/8" stereo to BNC connector cables in the studio and you must understand what each does. The most reliable involves a small box with a stereo plug on one side (labeled "3.5 mm stereo") and 2 BNC connectors on the other (labeled "Left" and "Right"). Use a cable with stereo jacks on each end with the box to convert to BNC. The other prepared cables are described next, but be aware that they have reliability issues. The single BNC to stereo cables with red or white tape on them will feed a BNC signal to ONLY the right channel (red tape) or left channel (white tape) or receive ONLY the right or left output respectively and pass it to the BNC connector. If you feed a right channel signal into the DSP you must watch a right channel output to see anything. There are also similarly looking cables with both red and white tape on them. These are for INPUT ONLY and feed the BNC signal to both the left and right channel 1/8" stereo plug on the DSP. The last cable is a splitter that connects both channels from the 1/8" stereo output to two separate BNC connectors. This may be used for either input or output. The red tape indicates the right channel and the white tape the left channel on the BNC connectors. There are several ways the cables may be used, BUT you must be consistent in order to see working signals from the DSP boards.

 

5. NOTE about the GRAPHICS SIMULATION experiment: apparently there has been a change in the campus computing environment and the procedure to run the DX program for PDF.NET has changed. Connect to rcs-ibm.rpi.edu instead of rcs-ibm2.rpi.edu and make sure you run "setup dx" before executing the program. The experimental procedure on the course page has been updated. A similar package using a MATLAB m-file will also work. The m-file "two_d_class.m" is available under Course Handouts, right below the Graphics Simulation experimental procedure. Also under Course Handouts is a brief guide for connecting to rcs-ibm.rpi.edu server directly from your Windows laptop.

 

ALL CONTROL EXPERIMENTS USING LabVIEW:

Make sure you use the "STOP" button on the control panel to halt the program. Hitting the stop sign icon near the run arrow icon will not update run parameters and will not reinitialize values for the next time the VI is run. Remember: NEVER save your changes when exiting LabVIEW to prevent the VIs from becoming corrupted. The Comdyna analog computers should all be correctly pre-wired for the control experiments. Check with the TA before changing any of the wires. A lot of time is wasted trying to correct an incorrectly wired panel or worse, taking data on an plant with the wrong response.

 

6. Note the footnote on the first page of the Hybrid Control Lab procedure explaining the options for which parts of the procedure are to be completed for the experiment. Run the latest version, Hybrid Controller DAQmx+.vi. The default parameters in each of the VIs yield stable controllers, but better values should be calculated. Also note that switching from one VI to another with the tabs does NOT automatically halt the first VI. If you do not manually stop the first VI it may continue to run and give unexpected results as 2 programs try to simultaneously control the output voltage on the D/A channels. Move the mode switch from POT SET to OPR. For each run (oscilloscope on ~10s/div, triggering on the left side of the screen) on the analog computer push the IC button (reset initial conditions), the OP button (operate mode), and then wait for the scope trace to start a new sweep before running the VI program.

 

7. The latest DC Motor DAQmx+.vi is the program to use. This should work as described in the experiment procedure. If it isn't clear, the LabVIEW controller replaces the Analog Computer controller in the diagram in FIGURE 7 for the digital control part of the procedure. The LabVIEW VI front panel instructions for input and output connections may refer to the previous implementation of the lab. The analog output AO 0 goes to the Power Amp(-) input and the AI 0 comes from the summing OP AMP output.

 

8. The Optimal Control program (Optimal Controller DAQmx+.vi) includes the Impulse Response component; read the procedure (p. 6) to see how to use it.

 

There are 2 methods for obtaining solutions to the Discrete Riccati Equation: download the MATLAB m-file on the web page following the lab procedure handout and run it for different T values, or open a DOS window and run the old version of the program C:\CSTUDIO\RTA_LAB\OPTIMAL\OPTIMAL.EXE (copy from http://www.ecse.rpi.edu/courses/CStudio/RTA_lab/Optimal/OPTIMAL.EXE if missing). In OPTIMAL.EXE, select the last of the 3 menu options (select with arrow keys & <Enter>) after the splash screen, enter the system parameters, and hit the <End> key. The program will display the solution to the P matrix and the state feedback gains. (There will be an error if the DOS controller is run.) Alternatively, MATLAB has a continuous lqr() and a discrete dlqr() function to calculate the gains {[G, P] = lqr(A, B, Q, R, 0) or [K, P] = dlqr(A, B, Q, R, 0)}. Use these to check your answers, but be aware that only the final solution for the P matrix is displayed. You are still expected to be able to set up and/or manually calculate values for the final exam. Note that the lab procedure defines G = -R-1B'P & u(t) = Gx(t) while MATLAB defines G = R-1B'P & u(t) = -Gx(t).

 

A 4-channel scope should be used to observe the input as well as the 2 system states simultaneously.

 

 

GENERAL COMMENTS on LAB REPORTS & GRADING:

 

1. Organize: Put relevant data and explanations in same place. While taking data in the lab, please keep in mind that they will be a part of the report, and so be neat and clean.

 

2. Technical Writing: Refrain from using terms whose technical definition is not known (example: 'resolution' of a signal is a well defined term and better than 'quality' [which may have an entirely different meaning]). You were not penalized for this in the intro, but this may lead to confusion and possible penalty in further labs.

 

3. Answer compulsory questions. While answering, write the question # beside its corresponding answer.

 

4. Think twice before classifying some observations as stray. That might be exactly what is expected.

 

5. Most important: More than the pictures, we are looking for the ability to read them. We are also looking for a proper interpretation of pictures. Make sure relevant details are not left out (i.e. trying to show DC offset on a scope photo, without sketching the ground line!!). Figures should be referenced in the text and, better yet, have captions explaining what they are. The harder it is for the grader to determine what you are doing is correct the more points you will lose.