Ltf matlab source
From DIDEAS Wiki
PF Users Navigation:
- PCB; Lifefix_users; Pf_users; benchtest_users; CalibFix Users; Hardware; Assembly ; iochan ;
- PCA : PCB ; AKENC SC/MC 218 ; FET 217 ; IMU219 ; Swifi ; Rev200_mods ; PCA Inventory
- Special Commands to the Ankle (PFCMD) : State Controller Commands; Motor Controller Commands; Python Examples; IMU Commands ;PFCMD_PY; Pf_calb_table_py; Virtual spring test; PF EEPROM
- DOC: Pf_users; Powerfoot Keyboard User Interface; Steps for Manual Tuning; "Dashboard" Program For Assisting with Tuning
- NEW (CEB) WIKI
- Torque Feedback Controller Guide
potential function
ltf_pf-2009_12_16.m
fname = 'static_test_experiment_log-20091216_1.txt'; s = importdata(fname); % compute the JR3 DC offset from the first 2 log entries which are +-0.2 amps dc = (s.data(1,:) + s.data(2,:) )/2; ndx = 1:length(s.data); % use full data set bd_pos = s.data(ndx,1); current = s.data(ndx,2); qiq = s.data(ndx,3); ank_pos = s.data(ndx,4); lw = s.data(ndx,5); jr3z = s.data(ndx,8) - dc(8); % apply DC correction, grab the Fz component jr3x = s.data(ndx,6) - dc(6); jr3y = s.data(ndx,7) - dc(7); ndx = find( bd_pos == -11000) subplot(2,1,1); plot(jr3z(ndx), ank_pos(ndx)/2048,'.'); grid on title('Ak motor rotations, vs JR3 force at Bw=-11000, Imot=-9 : 9 amps') ylabel('Ak motor rotations') xlabel('JR3z force N') subplot(2,1,2); plot(lw(ndx), ank_pos(ndx)/2048,'.'); grid on title('Ak motor rotations, vs LW force at Bw=-11000, Imot=-9 : 9 amps') xlabel('LW force N (over 12 hrs)') ylabel('Ak motor rotations')
ltf_bd_dep-121509.m
fname = 'static_test_experiment_log-121509.txt'; s = importdata(fname); % compute the JR3 DC offset from the first 2 log entries which are +-0.2 amps dc = (s.data(1,:) + s.data(2,:) )/2; ndx = 1:length(s.data); bd_pos = s.data(ndx,1); current = s.data(ndx,2); qiq = s.data(ndx,3); ank_pos = s.data(ndx,4); lw = s.data(ndx,5); jr3z = s.data(ndx,8) - dc(8); % apply DC correction, grab the Fz component jr3x = s.data(ndx,6) - dc(6); jr3y = s.data(ndx,7) - dc(7); whos % sift the data, find the index positions where the current is a specific value ndx = find( current == 9.0); ndx2 = find( current == -9.0); subplot(2,1,1); plot( bd_pos(ndx) , [jr3z(ndx), jr3z(ndx2)],'.'); grid on; legend('+9amps)','-9amps'); title('Dependence of JR3 force on backdrive position (exp 121509)') ylabel('newtons') xlabel('back drive motor position'); subplot(2,1,2); plot( bd_pos(ndx) , [lw(ndx), lw(ndx2)],'.'); grid on; legend('+9amps)','-9amps'); title('Dependence of LW force on backdrive position (exp 121509)') ylabel('newtons') xlabel('back drive motor position'); saveas(gcf, 'force_dependence_on_bd_posion_121509.png')