Thursday, September 8, 2022
Python program for controlling NI-cDAQ device without LABView installation
- Requires NI-MAX driver more than 17.0
- Lots of dependencies for nidaqmx python wrapper for the C API given by NI
- Plotting is using Matplotlib
- Use pip download option to download all the required dependencies as whl files on the computer with internet and then transfer the folder with whl files to the DAQ computer that is without internet
- Use pip install --find-links --no-index option to install the nidaqmx on the DAQ computer without internet
- The python program below generates signals used to excite the power amplifiers.Force from power amplifiers is measured via FX293 load cells via NI9205 input card.
- Generation and acquisition tasks must be committed before being used. Other wise there is big lag between start of generation task and start of acquisition tas
- See if you can use same clock source for both generation and acquisition to ensure synchronous use
- Trigger can be used on output task. Output tasks trigger is given by input task. input task should be committed before taking trigger from it.
- If you are using a task in a loop, always close the task for each loop use. Other wise the task will not read new data.
- Program below:
Thursday, September 1, 2022
NIKOTTO presentation on IC engine DAQ
- NIKotto = startup by IITM PHD students
- Data acquisition through NI PXI system
- Data transferred from NI PXI to workstation through LAN
- Python code does data processing in workstation
- DASH python used for making UI running in browser connected to local host
- Data is stored in file formal HDF5
- DASH good for presenting plots, writing reports
Saturday, August 20, 2022
STM 32 programming
https://www.youtube.com/watch?v=VlCYI2U-qyM&ab_channel=Phil%E2%80%99sLab
STM32 can be programmed via
- Not clear: Serial wire debug = SWD
- Not clear: JTAG
- DFU= Device firware upgrade
- ( No provision of setting break points in DFU mode)
- Use application note AN3156
- STM32 Cube programmer software use elf file as input
- STM32 Cube programmer can upload using
- STLINK
- USB
- UART
- Boot zero pin to be pulled to high and restart the MCU to put the MCU in the DFU mode.
- After flashing the elf file to the MCU using the STM32 Cube programmer, pull boot 0 pin low, restart the MCU
- Not clear: Via USB = You have to write your own boot loader for this.
Saturday, August 13, 2022
DynCont#5 Fixed and relative frames of reference in high speed shafts
- We always measure the speed only in the fixed frame of reference, inertial, non accelerating, constant velocity.
- It is easier to do integration in ground fixed, inertial frame of reference.
- But for a whirling shaft / tumbling body, the mass moment of inertia along the x axis of fixed frame of reference keeps changing due to the tumbling of the disk,even though the disk is rigid.
- For an axis system that is aligned to the disk at a particular instant in time, not fixed to the disk, the mass moment of inertia along the x axis of the aligned system is constant.
- But it is difficult to do time integrations along this axis system that is aligned to the disk
- Again, we are only measuring with respect to ground fixed reference system. That value, we are expressing in terms of an axis system that is aligned to the disk at that particular instant of time. This is only to use the inertia defined in the disk aligned axis system. With this kinetic energy, we can write the Lagrange governing equation and then derive the fundamental equation of motion.
Saturday, August 6, 2022
Skills
Mathematical modeling
- Development of physics based models for mechanical systems from fundamental equations.
- Development of plant models using system identification techniques from test data with various control inputs (Step, impulse, sine sweep, PRBS)
- Development of performance augmentation controllers / Stabilising controllers using
- PD
- PI
- PID
- LQR
- State space control
- Development of simulation models in
- Python using numpy/scipy
- Matlab with Simulink.
- Tuning of controllers using the simulation models
Embedded programming / Electrical schematics / PCB
- Implementation of control algorithms in C for TI MCU / AVR MCU / C2000 DSP
- Design of electrical schematics for controllers and power circuits
- Design of signal conditioners for ADC and DAC
- Simulation of electrical schematics using LTspice/Falstad
- Design of PCB (low speed upto 5kHz)
Mechanical design
- Design of test rigs using Solidworks : Dimensioning/TOleranceing GD &T as per ASME standards
- Optimising design for assembly and manufacturability.
- Design of sheet metal structures for equipment , test rigs and protective enclosures.
- Design of welded structures / frames
- Follow up : Fabrication of machined parts : CNC turning center / VMC machining center.
- Follow up : 3D printing (ABS/PLA/PCA)
Friday, July 22, 2022
DynCont#5: Z transform, Phils Lab, DDorran
Phisl lab
- Z transform is better than Fourier transform because it can do 2 things:
- Check the stability of the implemented difference equation
- See the frequency response of the system, that the difference equation represents
- Z transform based stability check: Simple, replace y[n-1] by z^-1 Y and form the Z transfer function and check the location of poles . Zeros can be out side the unit circle for stable system
- Z transform based frequency response z^(-k) = e^(-j theta k), where theta = 2*pi*f/fs. Maximum value f can take is fs/2 so maximum value theta can take is theta = pi.
- For DC gain, omega is zero so z = 1
- For high frequency gain, z= -1
DDorran
- Z transform is used to detect the presence of exponentially increasing or decreasing components in the signal
- By identifying the increasing or decreasing oscillations in the impulse response of a system we can determine if that system is stable or unstable
- x[n] is a signal with different values for different n. z^(-n) is also a signal for different values of z. Multiplying individual values of the 2 signals and adding them is basically taking correlation of 2 signals. Higher the correlation, more is one signal present in another signal
- Correlation is the measure of presence of one signal in another signal.
- When taking correlation of 2 signals, note that if second signal is constructed using z = 1, then we are basically taking the DC value of the first signal. Also see 4th point of previous stack.
- Z is e^(-sT). Value of the z transform at z = 1 in the plot with z values as x axis is the DC value of the signal.
Subscribe to:
Posts (Atom)