Code covered by the BSD License  

Highlights from
Motion Control Demo

image thumbnail

Motion Control Demo

by

 

30 Oct 2007 (Updated )

Model Based Design Demonstration Based on a Motion Control Case Study

DMC_parameters.m
%% Definition of model parameters 
%---------------------------------------------
%|     The Digital Motion Control Demo       |
%---------------------------------------------
%| A practical lesson in Model-Based Design. |
%| Prepared by:                              |
%| Paul Lambrechts, August, 2007             |
%| Copyright 2007, The MathWorks, Inc.       |
%---------------------------------------------
%| Note: This demo is prepared with R2007a   |
%---------------------------------------------

% xPC TargetBox Base Adresses
IO301_base = '0x300';
IO306_base = '0x280';

% Look for PE_data (only correct for DMC 0)
if exist('PE_data.mat','file')==2
    load PE_data
else
    time=0;
    Tin=0;
    Rin=0;
end

% System Parameters
DMC=1;
switch DMC
    case 0
        J1=1.45e-6;  % motor inertia                   [kgm2]
        J2=1.15e-7;  % load  inertia                   [kgm2] 
        b1=2e-7;     % motor bearing damping           [Nms/rad]
        b2=2e-7;     % load  bearing damping           [Nms/rad]
    case 1
        J1=9.8e-7;   % motor inertia                   [kgm2]
        J2=1.5e-7;   % load  inertia                   [kgm2] 
        b1=2e-7;     % motor bearing damping           [Nms/rad]
        b2=2e-7;     % load  bearing damping           [Nms/rad]
end
Ts=0.002;    % sampling rate                   [s]
b12=1.5e-6;  % internal damping flexible shaft [Nms/rad]
k=0.013;     % stiffness of flexible shaft     [Nm/rad
Km=16.4e-3;  % motor constant                  [Nm/A]
Ka=0.5;      % power amplifier gain            [A/V]

disp('DMC_parameters loaded')

Contact us