CIM+FRF+measurements

=CIM Experimental Setup: FRF measurements= toc Files that can be used with this document:

Hardware setup


Voice Coil: Force sensor: Amplifier: Laser head RRI (retroreflector): Laserinterferometer: Data acquisition is done with NI-usb 6216 device: ni-usb-6216

DAQ setup: Electronic setup:

Pinouts ni-usb-6216:
 * 48: Maxon- ground
 * 45: Laser - enable
 * 44: Maxon - enable
 * 43: Laser - ground
 * 35: Laser - B
 * 34: Laser - Z
 * 33: Laser - A
 * 18: Maxon - diff -
 * 17: Maxon - diff +
 * 16: Force - diff -
 * 15: Force - diff +
 * 14: Maxon - set -
 * 12: Maxon - set +

Mechanical hardware
The mechanical hardware consist of a 'bridge' to guide the voice-coil actuator, this bridge is designed to have a very low stiffness in actuating direction, but a very high stiffness in all other directions. The force sensor is connected to the voice coil via a flexure guidance that has a high stiffness in actuation direction, but a low stiffness in the bending directions. This is to overcome slight errors in straightness in the setup. The Device Under Test (DUT) in this case is an aluminum bar, connected to the world on one end, and connected to the Force sensor via a ring on the other end. There is also an retro-reflector connected to the ring, for the laser interferometer.

Mechanical parameters: Spring stiffness DUT: 205800 [N/m] (after measuring deflection due to load) Moving mass entire setup: 1.033 [kg] Natural frequency DUT + ring + reflector: 153 [Hz], see picture Natural frequency entire setup: 73 [Hz], see picture



Data aquisition in Matlab
When the driver for the ni-usb 6216 is installed (ni-daqmx: daqmx) and also the Matlab Data Aquisition Toolbox is installed, the following script can be used to perform a measurement.

Create data aquisition session
code format="matlab" %% Create session % first discover device: % d = daq.getDevices; % ni: National Instruments USB-6216 (Device ID: 'Dev2')

% Create session for 'ni' device s = daq.createSession('ni');

% add digital channel for enable interferometer and Maxon amp. % this step is to enable the interferometer with a digital signal % this channel must be deleted after enabling the interferometer s.addDigitalChannel('Dev2','port0/line0','OutputOnly'); s.outputSingleScan (1); % enable s.removeChannel(1); % remove code The digital channels is added and set to 1, to enable the amplifier and the laser interferometer.

Add functional channels
code format="matlab" %% Add functional channels

% first set initial measurement time and sampling rate Rate_initial = 10; Meas_time_initial = 2; s.Rate = Rate_initial; s.DurationInSeconds = Meas_time_initial;

% add analog output: Moving Magnet Actuator s.addAnalogOutputChannel('Dev2',0,'Voltage');

% add analog input: measuring Voltage to Actuator % Differential measurement uses ai1 & ai9 (17&18) s.addAnalogInputChannel('Dev2',1,'Voltage'); s.Channels(2).TerminalConfig = 'Differential'; %s.Channels(2).TerminalConfig = 'SingleEnded';

% add analog input: Force sensor % Differential uses ai0 and ai8 (15&16) (chanel 10) s.addAnalogInputChannel('Dev2',0,'Voltage'); s.Channels(3).TerminalConfig = 'Differential'; %s.Channels(3).TerminalConfig = 'SingleEnded';

% add interferometer (last, so phase is correct) s.addCounterInputChannel('Dev2',0,'Position'); % use ID 0 for encoder % set X4 encoder type s.Channels(4).EncoderType = 'X4'; %s.Channels(4).ZResetCondition = 'AHigh'; s.Channels(4).ZResetEnable = 1; %s.Channels(4).ZResetValue = 0; code

Measurement settings and output signal
code format="matlab" %% Measurement settings Rate = 10000; Meas_time = 150;

% set settings s.Rate = Rate; %s.DurationInSeconds = Meas_time;

%% make analog output signal

% time signal t = 0:1/Rate:Meas_time; % % random output A = 8; % amplitude sigout = A*(-1+2*rand(size(t))); code The output signal is a random signal between -8 and +8 V.

Run measurement
code format="matlab" %% run measurement

s.queueOutputData(sigout'); data = s.startForeground;

%% shut down interferometer and Maxon Ampl. s.addDigitalChannel('Dev2','port0/line0','OutputOnly'); s.outputSingleScan ([0 0]); % disable s.removeChannel(5); % remove code The measurement is run, and afterwards the amplifier and interferometer are disabled.

Convert data
code format="matlab" %% convert data (unsigned integer to negative) pos = data(:,3); pos(pos>2^31) = pos(pos>2^21)-2^32; % resolution of encoder: 20 nanometer Res_enc = 19.7756e-9; pos = pos*Res_enc;

% actuator act = data(:,1); % Force sensor Force = data(:,2); % gevoeligheid Force sensor Gforce = 22.48e-3; % [mV/N] force = Force/Gforce; code The ni daqmx driver returns unsigned integer values. This is a problem when the interferometer starts at 0 and goes to negative values. Converting these values can also be done with the "typecast" command in Matlab. In this section, the encoder resolution and force sensor sensitivity are also used.

Saving data
code format="matlab" %% Create measurement structure Meas = struct; Meas.time = t; Meas.pos = pos; Meas.act = act; Meas.force = force; Meas.data = data; Meas.out = sigout; Meas.text = 'Ruismeting |8V uit | Maxon, potmeter P4: half'; Meas.datum = datestr(now);

%% Save measurement Data save 2013-11-05_Ruismeting Meas code The data is put into measurement structure "Meas" and saved to file.

Data alalysis
To analyze the data, the following script can be used.

Load data
code format="matlab" %% data laden

% Differential, ruis input load('2012-11_05_Ruismeting.mat'); DF_ruis_Meas = Meas; DF_r.pos = DF_ruis_Meas.pos; DF_r.Vact = DF_ruis_Meas.data(:,1); DF_r.Vfor = DF_ruis_Meas.data(:,2); DF_r.time = DF_ruis_Meas.time'; DF_r.force = Meas.force; code

FRF settings
code format="matlab" %% FRF % FRF om laagfrequente overdracht van force naar positie te bekijken % NFFT instellen fs = 10000; %Samplefrequency nfft=2^15; % window length noverlap=nfft/2; % overlap between widows wmax=fs/2; % maximum frequency wmin=fs/nfft; % minimum frequency % % Some calculations on measurement nsamp=length(DF_r.pos); % number of samples nframes=nsamp/nfft; % number of frames (avaraging) frametime=nfft/fs; % timelength of frame fres=1/frametime; % frequency resolution

% Display FFT settings disp('- - -') disp('N sampeles (x1.000.000) -  N frames  -  Freq res  -  Frame time') disp([nsamp*1e-6 nframes fres frametime]); code Make sure that there are enough frames to average over, and also that the resolution is high enough (small frequencies). This means that you have to do a long measurement.

FRF calculation
code format="matlab" %% FRF berekenen

% FRF: Voicecoil -> Positie FRF_in = -DF_r.Vact; FRF_out = DF_r.pos;

[H1, fx1] = tfestimate(FRF_in, FRF_out, hanning(nfft), noverlap ,nfft, fs); figure(5) f = gcf; set(f,'Position',[10 10 800 700]); subplot(3,1,1); semilogx(fx1, db(H1)); grid on; title('FRF: Voicecoil -> Positie') axis([wmin wmax min(db(H1)) max(db(H1))]); ylabel('Magnitude [db]'); subplot(3,1,2); semilogx(fx1, angle(H1)*180/pi); grid on; axis([wmin wmax -200 200]); ylabel('Phase [degrees]'); [H1coh1, wcoh1] = mscohere(FRF_in, FRF_out, hanning(nfft), noverlap, nfft,fs); subplot(3,1,3); semilogx(wcoh1, H1coh1); ylabel('Coherence'); axis([wmin wmax 0 1]); grid on; ylabel('Coherence'); xlabel('Frequency [Hz]');

% FRF: Voicecoil -> force sensor FRF_in = -DF_r.Vact; FRF_out = DF_r.force;

[H1, fx1] = tfestimate(FRF_in, FRF_out, hanning(nfft), noverlap ,nfft, fs); figure(6) f = gcf; set(f,'Position',[10 10 800 700]); subplot(3,1,1); semilogx(fx1, db(H1)); grid on; title('FRF: Voicecoil -> force sensor') axis([wmin wmax min(db(H1)) max(db(H1))]); ylabel('Magnitude [db]'); subplot(3,1,2); semilogx(fx1, angle(H1)*180/pi); grid on; axis([wmin wmax -200 200]); ylabel('Phase [degrees]'); [H1coh1, wcoh1] = mscohere(FRF_in, FRF_out, hanning(nfft), noverlap, nfft,fs); subplot(3,1,3); semilogx(wcoh1, H1coh1); ylabel('Coherence'); axis([wmin wmax 0 1]); grid on; ylabel('Coherence'); xlabel('Frequency [Hz]');

% FRF: Force sensor -> Position encoder FRF_in = DF_r.force; FRF_out = DF_r.pos;

[H1, fx1] = tfestimate(FRF_in, FRF_out, hanning(nfft), noverlap ,nfft, fs); figure(7) f = gcf; set(f,'Position',[10 10 800 700]); subplot(3,1,1); semilogx(fx1, db(H1)); grid on; title('FRF: Force sensor -> Position encoder') axis([wmin wmax min(db(H1)) max(db(H1))]); ylabel('Magnitude [db]'); subplot(3,1,2); semilogx(fx1, angle(H1)*180/pi); grid on; axis([wmin wmax -200 200]); ylabel('Phase [degrees]'); [H1coh1, wcoh1] = mscohere(FRF_in, FRF_out, hanning(nfft), noverlap, nfft,fs); subplot(3,1,3); semilogx(wcoh1, H1coh1); ylabel('Coherence'); axis([wmin wmax 0 1]); grid on; ylabel('Coherence'); xlabel('Frequency [Hz]'); code

Analyzing the plots
The previous script gave the following plots

From this figure it can be seen that the whole setup behaves as a mass spring damper system up to 500 Hz. After that some higher harmonics come into play. The natural frequency of the setup is around 70 Hz. This is comparable to the result of the pulse-response.

The next picture shows the FRF from voicecoil to force sensor. In this picture the natural frequency of the entire setup is visible around 70 Hz. Also there is a valley visible around 150 Hz. This could be the natural frequency of the DUT (aluminium bar) alone.

The last picture shows the FRF from Force sensor to Position (laser interferometer). Here a natural frequency of around 155 Hz can be seen. There is a slight dip in this peak just below 150 Hz. It is not clear what is causing this dip. The peak in this figure compares to the pulse response of the DUT in the figure above.

PSD plots
The PSD plots below can be used to see why the above FRF plots look that way.

Final thoughts
It seems that it is possible to calculate the natural frequency from these FRF measurements. Other properties like damping, stiffness and mass have not yet been determined from these measurements.