pull current version from github and reapply own changes
|
@ -2,4 +2,9 @@
|
||||||
.pio/
|
.pio/
|
||||||
.pioenvs/
|
.pioenvs/
|
||||||
.vscode/
|
.vscode/
|
||||||
01_Matlab/slprj/
|
MDK-ARM/DebugConfig/
|
||||||
|
MDK-ARM/Listing/
|
||||||
|
MDK-ARM/Objects/
|
||||||
|
MDK-ARM/RTE/
|
||||||
|
MDK-ARM/*.uvguix.*
|
||||||
|
build/
|
||||||
|
|
12
.travis.yml
|
@ -1,14 +1,15 @@
|
||||||
notifications:
|
notifications:
|
||||||
email: true
|
email: true
|
||||||
|
|
||||||
sudo: false
|
os: linux
|
||||||
|
|
||||||
matrix:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
|
|
||||||
- name: make (gcc-arm-none-eabi-7)
|
- name: make (gcc-arm-none-eabi-7)
|
||||||
script: make
|
script: make
|
||||||
|
env: VARIANT=VARIANT_ADC
|
||||||
language: c
|
language: c
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -27,6 +28,7 @@ matrix:
|
||||||
|
|
||||||
- name: make (gcc-arm-none-eabi-5)
|
- name: make (gcc-arm-none-eabi-5)
|
||||||
script: make
|
script: make
|
||||||
|
env: VARIANT=VARIANT_ADC
|
||||||
language: c
|
language: c
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -43,11 +45,9 @@ matrix:
|
||||||
- export PATH=$HOME/arm-gcc-toolchain/bin:$PATH
|
- export PATH=$HOME/arm-gcc-toolchain/bin:$PATH
|
||||||
before_script: arm-none-eabi-gcc --version
|
before_script: arm-none-eabi-gcc --version
|
||||||
|
|
||||||
- name: pio genericSTM32F103RC
|
- name: platformio
|
||||||
script: platformio run -e genericSTM32F103RC
|
script: platformio run
|
||||||
language: python
|
language: python
|
||||||
python:
|
|
||||||
- "2.7"
|
|
||||||
install:
|
install:
|
||||||
- pip install -U platformio
|
- pip install -U platformio
|
||||||
- platformio update
|
- platformio update
|
||||||
|
|
Before Width: | Height: | Size: 189 KiB |
|
@ -1,100 +0,0 @@
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
% This file is part of the hoverboard-new-firmware-hack-FOC project
|
|
||||||
%
|
|
||||||
% Author: Emanuel FERU
|
|
||||||
% Copyright © 2019 Emanuel FERU <aerdronix@gmail.com>
|
|
||||||
%
|
|
||||||
% This program is free software: you can redistribute it and/or modify
|
|
||||||
% it under the terms of the GNU General Public License as published by
|
|
||||||
% the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% (at your option) any later version.
|
|
||||||
%
|
|
||||||
% This program is distributed in the hope that it will be useful,
|
|
||||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% GNU General Public License for more details.
|
|
||||||
%
|
|
||||||
% You should have received a copy of the GNU General Public License
|
|
||||||
% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
|
|
||||||
%% =========================================================================
|
|
||||||
% get_param(gcb, 'BlockType')
|
|
||||||
|
|
||||||
% Compile model
|
|
||||||
BLDCmotorControl_FOC_R2017b_fixdt([],[],[],'compile');
|
|
||||||
modelName = 'BLDCmotorControl_FOC_R2017b_fixdt';
|
|
||||||
|
|
||||||
Parameter = '';
|
|
||||||
DataType = '';
|
|
||||||
|
|
||||||
% Search for constants
|
|
||||||
Blocks = find_system(modelName, 'regexp', 'on', 'BlockType', 'Constant');
|
|
||||||
for k = 1:length(Blocks)
|
|
||||||
|
|
||||||
if strcmp('yellow',get_param(Blocks{k},'BackgroundColor')) % get only the tunnable parameters
|
|
||||||
|
|
||||||
val = get_param(Blocks{k}, 'Value'); % BreakpointsData, Table
|
|
||||||
typ = get_param(Blocks{k}, 'CompiledPortDataTypes');
|
|
||||||
Parameter{end+1,1} = val;
|
|
||||||
DataType{end+1,1} = typ.Outport{1};
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Search for PreLookup
|
|
||||||
Blocks = find_system(modelName, 'regexp', 'on', 'BlockType', 'PreLookup');
|
|
||||||
for k = 1:length(Blocks)
|
|
||||||
|
|
||||||
if strcmp('yellow',get_param(Blocks{k},'BackgroundColor')) % get only the tunnable parameters
|
|
||||||
|
|
||||||
val = get_param(Blocks{k}, 'BreakpointsData'); % BreakpointsData, Table
|
|
||||||
typ = get_param(Blocks{k}, 'CompiledPortDataTypes');
|
|
||||||
Parameter{end+1,1} = val;
|
|
||||||
DataType{end+1,1} = typ.Inport{1};
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Search for Interpolation_n-D
|
|
||||||
Blocks = find_system(modelName, 'regexp', 'on', 'BlockType', 'Interpolation_n-D');
|
|
||||||
for k = 1:length(Blocks)
|
|
||||||
|
|
||||||
if strcmp('yellow',get_param(Blocks{k},'BackgroundColor')) % get only the tunnable parameters
|
|
||||||
|
|
||||||
val = get_param(Blocks{k}, 'Table'); % BreakpointsData, Table
|
|
||||||
typ = get_param(Blocks{k}, 'CompiledPortDataTypes');
|
|
||||||
Parameter{end+1,1} = val;
|
|
||||||
DataType{end+1,1} = typ.Outport{1};
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Search for Relay
|
|
||||||
Blocks = find_system(modelName, 'regexp', 'on', 'BlockType', 'Relay');
|
|
||||||
for k = 1:length(Blocks)
|
|
||||||
|
|
||||||
if strcmp('yellow',get_param(Blocks{k},'BackgroundColor')) % get only the tunnable parameters
|
|
||||||
|
|
||||||
val1 = get_param(Blocks{k}, 'OnSwitchValue');
|
|
||||||
val2 = get_param(Blocks{k}, 'OffSwitchValue');
|
|
||||||
typ = get_param(Blocks{k}, 'CompiledPortDataTypes');
|
|
||||||
Parameter{end+1,1} = val1;
|
|
||||||
Parameter{end+1,1} = val2;
|
|
||||||
DataType{end+1,1} = typ.Inport{1};
|
|
||||||
DataType{end+1,1} = typ.Inport{1};
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Terminate compilation
|
|
||||||
BLDCmotorControl_FOC_R2017b_fixdt([],[],[],'term');
|
|
||||||
|
|
||||||
% Create table
|
|
||||||
T = table(Parameter,DataType);
|
|
||||||
T = unique(T, 'rows'); % remove duplicates
|
|
||||||
T = sortrows(T); % sort
|
|
||||||
writetable(T,'tableParamType.xlsx'); % write to file
|
|
||||||
|
|
||||||
disp('---- Parameters Table: Successful ----');
|
|
|
@ -1,27 +0,0 @@
|
||||||
function setBlockSetting(topLevelModel,block,setting,value)
|
|
||||||
% This function changes a certain setting for a specific type of blocks found within the main model
|
|
||||||
% ============================================================
|
|
||||||
% Example
|
|
||||||
% setBlockSetting(bdroot, 'Inport', 'BackgroundColor', 'cyan');
|
|
||||||
% setBlockSetting(bdroot, 'Outport', 'BackgroundColor', 'orange');
|
|
||||||
% ============================================================
|
|
||||||
|
|
||||||
% Load Top Model
|
|
||||||
if( ~bdIsLoaded( topLevelModel ) )
|
|
||||||
load_system( topLevelModel ); % If Model is not already loaded, load it
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
%% Find Model Reference Blocks in the top level model:
|
|
||||||
topLevelModelHandle = get_param( topLevelModel , 'Handle' );
|
|
||||||
blkHandles = find_system( topLevelModelHandle, 'findall', 'on', 'FollowLinks', 'off', 'LookUnderMasks', 'on', 'blocktype', block);
|
|
||||||
|
|
||||||
if( ~isempty( blkHandles ) ) % If the model contains model references
|
|
||||||
|
|
||||||
for k = 1 : length(blkHandles)
|
|
||||||
set_param(blkHandles(k), setting, value);
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
disp('---- Setting done ----');
|
|
|
@ -1,181 +0,0 @@
|
||||||
/*
|
|
||||||
* File: filtLowPass.c
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'filtLowPass'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1167
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 6 22:11:53 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "filtLowPass.h"
|
|
||||||
#ifndef UCHAR_MAX
|
|
||||||
#include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
|
|
||||||
#error Code was generated for compiler with different sized uchar/char. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
|
|
||||||
#error Code was generated for compiler with different sized ushort/short. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized uint/int. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized ulong/long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Skip this size verification because of preprocessor limitation */
|
|
||||||
#if ( ULLONG_MAX != (0xFFFFFFFFFFFFFFFFULL) ) || ( LLONG_MAX != (0x7FFFFFFFFFFFFFFFLL) )
|
|
||||||
#error Code was generated for compiler with different sized ulong_long/long_long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int16_T filtLowPass_l(int16_T rtu_u, uint16_T rtu_coef, DW_filtLowPass
|
|
||||||
*localDW);
|
|
||||||
|
|
||||||
/*===========*
|
|
||||||
* Constants *
|
|
||||||
*===========*/
|
|
||||||
#define RT_PI 3.14159265358979323846
|
|
||||||
#define RT_PIF 3.1415927F
|
|
||||||
#define RT_LN_10 2.30258509299404568402
|
|
||||||
#define RT_LN_10F 2.3025851F
|
|
||||||
#define RT_LOG10E 0.43429448190325182765
|
|
||||||
#define RT_LOG10EF 0.43429449F
|
|
||||||
#define RT_E 2.7182818284590452354
|
|
||||||
#define RT_EF 2.7182817F
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UNUSED_PARAMETER(x)
|
|
||||||
* Used to specify that a function parameter (argument) is required but not
|
|
||||||
* accessed by the function body.
|
|
||||||
*/
|
|
||||||
#ifndef UNUSED_PARAMETER
|
|
||||||
# if defined(__LCC__)
|
|
||||||
# define UNUSED_PARAMETER(x) /* do nothing */
|
|
||||||
# else
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the semi-ANSI standard way of indicating that an
|
|
||||||
* unused function parameter is required.
|
|
||||||
*/
|
|
||||||
# define UNUSED_PARAMETER(x) (void) (x)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Output and update for atomic system: '<Root>/filtLowPass' */
|
|
||||||
int16_T filtLowPass_l(int16_T rtu_u, uint16_T rtu_coef, DW_filtLowPass *localDW)
|
|
||||||
{
|
|
||||||
int32_T tmp;
|
|
||||||
int16_T rty_y_0;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<S1>/Low_Pass_Filter1' */
|
|
||||||
/* Sum: '<S2>/Sum1' incorporates:
|
|
||||||
* DataTypeConversion: '<S1>/Data Type Conversion'
|
|
||||||
* Product: '<S2>/Divide1'
|
|
||||||
* Product: '<S2>/Divide2'
|
|
||||||
* Sum: '<S2>/Sum5'
|
|
||||||
* UnitDelay: '<S2>/UnitDelay3'
|
|
||||||
*/
|
|
||||||
tmp = (((int16_T)(rtu_u << 4) * rtu_coef) >> 16) + (((int32_T)(65535U -
|
|
||||||
rtu_coef) * localDW->UnitDelay3_DSTATE) >> 16);
|
|
||||||
if (tmp > 32767) {
|
|
||||||
tmp = 32767;
|
|
||||||
} else {
|
|
||||||
if (tmp < -32768) {
|
|
||||||
tmp = -32768;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rty_y_0 = (int16_T)tmp;
|
|
||||||
|
|
||||||
/* Update for UnitDelay: '<S2>/UnitDelay3' incorporates:
|
|
||||||
* Sum: '<S2>/Sum1'
|
|
||||||
*/
|
|
||||||
localDW->UnitDelay3_DSTATE = (int16_T)tmp;
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<S1>/Low_Pass_Filter1' */
|
|
||||||
return rty_y_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model step function */
|
|
||||||
void filtLowPass_step(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
DW *rtDW = ((DW *) rtM->dwork);
|
|
||||||
ExtU *rtU = (ExtU *) rtM->inputs;
|
|
||||||
ExtY *rtY = (ExtY *) rtM->outputs;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<Root>/filtLowPass' */
|
|
||||||
|
|
||||||
/* Outport: '<Root>/y' incorporates:
|
|
||||||
* Inport: '<Root>/coef'
|
|
||||||
* Inport: '<Root>/u'
|
|
||||||
*/
|
|
||||||
rtY->y = (int16_T) filtLowPass_l(rtU->u, rtU->coef, &rtDW->filtLowPass_l2);
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<Root>/filtLowPass' */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model initialize function */
|
|
||||||
void filtLowPass_initialize(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
/* (no initialization code required) */
|
|
||||||
UNUSED_PARAMETER(rtM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* File: filtLowPass.h
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'filtLowPass'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1167
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 6 22:11:53 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RTW_HEADER_filtLowPass_h_
|
|
||||||
#define RTW_HEADER_filtLowPass_h_
|
|
||||||
#ifndef filtLowPass_COMMON_INCLUDES_
|
|
||||||
# define filtLowPass_COMMON_INCLUDES_
|
|
||||||
#include "rtwtypes.h"
|
|
||||||
#endif /* filtLowPass_COMMON_INCLUDES_ */
|
|
||||||
|
|
||||||
/* Macros for accessing real-time model data structure */
|
|
||||||
|
|
||||||
/* Forward declaration for rtModel */
|
|
||||||
typedef struct tag_RTM RT_MODEL;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>/filtLowPass' */
|
|
||||||
typedef struct {
|
|
||||||
int16_T UnitDelay3_DSTATE; /* '<S2>/UnitDelay3' */
|
|
||||||
} DW_filtLowPass;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>' */
|
|
||||||
typedef struct {
|
|
||||||
DW_filtLowPass filtLowPass_l2; /* '<Root>/filtLowPass' */
|
|
||||||
} DW;
|
|
||||||
|
|
||||||
/* External inputs (root inport signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T u; /* '<Root>/u' */
|
|
||||||
uint16_T coef; /* '<Root>/coef' */
|
|
||||||
} ExtU;
|
|
||||||
|
|
||||||
/* External outputs (root outports fed by signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T y; /* '<Root>/y' */
|
|
||||||
} ExtY;
|
|
||||||
|
|
||||||
/* Real-time Model Data Structure */
|
|
||||||
struct tag_RTM {
|
|
||||||
ExtU *inputs;
|
|
||||||
ExtY *outputs;
|
|
||||||
DW *dwork;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Model entry point functions */
|
|
||||||
extern void filtLowPass_initialize(RT_MODEL *const rtM);
|
|
||||||
extern void filtLowPass_step(RT_MODEL *const rtM);
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* The generated code includes comments that allow you to trace directly
|
|
||||||
* back to the appropriate location in the model. The basic format
|
|
||||||
* is <system>/block_name, where system is the system number (uniquely
|
|
||||||
* assigned by Simulink) and block_name is the name of the block.
|
|
||||||
*
|
|
||||||
* Note that this particular code originates from a subsystem build,
|
|
||||||
* and has its own system numbers different from the parent model.
|
|
||||||
* Refer to the system hierarchy for this subsystem below, and use the
|
|
||||||
* MATLAB hilite_system command to trace the generated code back
|
|
||||||
* to the parent model. For example,
|
|
||||||
*
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass') - opens subsystem BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass/Kp') - opens and selects block Kp
|
|
||||||
*
|
|
||||||
* Here is the system hierarchy for this model
|
|
||||||
*
|
|
||||||
* '<Root>' : 'BLDCmotorControl_FOC_R2017b_fixdt'
|
|
||||||
* '<S1>' : 'BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass'
|
|
||||||
* '<S2>' : 'BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass/Low_Pass_Filter1'
|
|
||||||
*/
|
|
||||||
#endif /* RTW_HEADER_filtLowPass_h_ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,181 +0,0 @@
|
||||||
/*
|
|
||||||
* File: filtLowPass.c
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'filtLowPass'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1165
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 6 22:00:52 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "filtLowPass.h"
|
|
||||||
#ifndef UCHAR_MAX
|
|
||||||
#include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
|
|
||||||
#error Code was generated for compiler with different sized uchar/char. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
|
|
||||||
#error Code was generated for compiler with different sized ushort/short. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized uint/int. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized ulong/long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Skip this size verification because of preprocessor limitation */
|
|
||||||
#if ( ULLONG_MAX != (0xFFFFFFFFFFFFFFFFULL) ) || ( LLONG_MAX != (0x7FFFFFFFFFFFFFFFLL) )
|
|
||||||
#error Code was generated for compiler with different sized ulong_long/long_long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int32_T filtLowPass_l(int16_T rtu_u, uint16_T rtu_coef, DW_filtLowPass
|
|
||||||
*localDW);
|
|
||||||
|
|
||||||
/*===========*
|
|
||||||
* Constants *
|
|
||||||
*===========*/
|
|
||||||
#define RT_PI 3.14159265358979323846
|
|
||||||
#define RT_PIF 3.1415927F
|
|
||||||
#define RT_LN_10 2.30258509299404568402
|
|
||||||
#define RT_LN_10F 2.3025851F
|
|
||||||
#define RT_LOG10E 0.43429448190325182765
|
|
||||||
#define RT_LOG10EF 0.43429449F
|
|
||||||
#define RT_E 2.7182818284590452354
|
|
||||||
#define RT_EF 2.7182817F
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UNUSED_PARAMETER(x)
|
|
||||||
* Used to specify that a function parameter (argument) is required but not
|
|
||||||
* accessed by the function body.
|
|
||||||
*/
|
|
||||||
#ifndef UNUSED_PARAMETER
|
|
||||||
# if defined(__LCC__)
|
|
||||||
# define UNUSED_PARAMETER(x) /* do nothing */
|
|
||||||
# else
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the semi-ANSI standard way of indicating that an
|
|
||||||
* unused function parameter is required.
|
|
||||||
*/
|
|
||||||
# define UNUSED_PARAMETER(x) (void) (x)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Output and update for atomic system: '<Root>/filtLowPass' */
|
|
||||||
int32_T filtLowPass_l(int16_T rtu_u, uint16_T rtu_coef, DW_filtLowPass *localDW)
|
|
||||||
{
|
|
||||||
int32_T q0;
|
|
||||||
int32_T q1;
|
|
||||||
int32_T rty_y_0;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<S1>/Low_Pass_Filter1' */
|
|
||||||
/* Sum: '<S2>/Sum1' incorporates:
|
|
||||||
* DataTypeConversion: '<S1>/Data Type Conversion'
|
|
||||||
* Product: '<S2>/Divide1'
|
|
||||||
* Product: '<S2>/Divide2'
|
|
||||||
* Sum: '<S2>/Sum5'
|
|
||||||
* UnitDelay: '<S2>/UnitDelay3'
|
|
||||||
*/
|
|
||||||
q0 = (int32_T)(((int64_T)(rtu_u << 16) * rtu_coef) >> 16);
|
|
||||||
q1 = (int32_T)(((int64_T)(65535U - rtu_coef) * localDW->UnitDelay3_DSTATE) >>
|
|
||||||
16);
|
|
||||||
if ((q0 < 0) && (q1 < MIN_int32_T - q0)) {
|
|
||||||
rty_y_0 = MIN_int32_T;
|
|
||||||
} else if ((q0 > 0) && (q1 > MAX_int32_T - q0)) {
|
|
||||||
rty_y_0 = MAX_int32_T;
|
|
||||||
} else {
|
|
||||||
rty_y_0 = q0 + q1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update for UnitDelay: '<S2>/UnitDelay3' incorporates:
|
|
||||||
* Sum: '<S2>/Sum1'
|
|
||||||
*/
|
|
||||||
localDW->UnitDelay3_DSTATE = rty_y_0;
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<S1>/Low_Pass_Filter1' */
|
|
||||||
return rty_y_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model step function */
|
|
||||||
void filtLowPass_step(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
DW *rtDW = ((DW *) rtM->dwork);
|
|
||||||
ExtU *rtU = (ExtU *) rtM->inputs;
|
|
||||||
ExtY *rtY = (ExtY *) rtM->outputs;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<Root>/filtLowPass' */
|
|
||||||
|
|
||||||
/* Outport: '<Root>/y' incorporates:
|
|
||||||
* Inport: '<Root>/coef'
|
|
||||||
* Inport: '<Root>/u'
|
|
||||||
*/
|
|
||||||
rtY->y = filtLowPass_l(rtU->u, rtU->coef, &rtDW->filtLowPass_l2);
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<Root>/filtLowPass' */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model initialize function */
|
|
||||||
void filtLowPass_initialize(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
/* (no initialization code required) */
|
|
||||||
UNUSED_PARAMETER(rtM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* File: filtLowPass.h
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'filtLowPass'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1165
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 6 22:00:52 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RTW_HEADER_filtLowPass_h_
|
|
||||||
#define RTW_HEADER_filtLowPass_h_
|
|
||||||
#ifndef filtLowPass_COMMON_INCLUDES_
|
|
||||||
# define filtLowPass_COMMON_INCLUDES_
|
|
||||||
#include "rtwtypes.h"
|
|
||||||
#endif /* filtLowPass_COMMON_INCLUDES_ */
|
|
||||||
|
|
||||||
/* Macros for accessing real-time model data structure */
|
|
||||||
|
|
||||||
/* Forward declaration for rtModel */
|
|
||||||
typedef struct tag_RTM RT_MODEL;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>/filtLowPass' */
|
|
||||||
typedef struct {
|
|
||||||
int32_T UnitDelay3_DSTATE; /* '<S2>/UnitDelay3' */
|
|
||||||
} DW_filtLowPass;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>' */
|
|
||||||
typedef struct {
|
|
||||||
DW_filtLowPass filtLowPass_l2; /* '<Root>/filtLowPass' */
|
|
||||||
} DW;
|
|
||||||
|
|
||||||
/* External inputs (root inport signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T u; /* '<Root>/u' */
|
|
||||||
uint16_T coef; /* '<Root>/coef' */
|
|
||||||
} ExtU;
|
|
||||||
|
|
||||||
/* External outputs (root outports fed by signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int32_T y; /* '<Root>/y' */
|
|
||||||
} ExtY;
|
|
||||||
|
|
||||||
/* Real-time Model Data Structure */
|
|
||||||
struct tag_RTM {
|
|
||||||
ExtU *inputs;
|
|
||||||
ExtY *outputs;
|
|
||||||
DW *dwork;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Model entry point functions */
|
|
||||||
extern void filtLowPass_initialize(RT_MODEL *const rtM);
|
|
||||||
extern void filtLowPass_step(RT_MODEL *const rtM);
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* The generated code includes comments that allow you to trace directly
|
|
||||||
* back to the appropriate location in the model. The basic format
|
|
||||||
* is <system>/block_name, where system is the system number (uniquely
|
|
||||||
* assigned by Simulink) and block_name is the name of the block.
|
|
||||||
*
|
|
||||||
* Note that this particular code originates from a subsystem build,
|
|
||||||
* and has its own system numbers different from the parent model.
|
|
||||||
* Refer to the system hierarchy for this subsystem below, and use the
|
|
||||||
* MATLAB hilite_system command to trace the generated code back
|
|
||||||
* to the parent model. For example,
|
|
||||||
*
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass') - opens subsystem BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass/Kp') - opens and selects block Kp
|
|
||||||
*
|
|
||||||
* Here is the system hierarchy for this model
|
|
||||||
*
|
|
||||||
* '<Root>' : 'BLDCmotorControl_FOC_R2017b_fixdt'
|
|
||||||
* '<S1>' : 'BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass'
|
|
||||||
* '<S2>' : 'BLDCmotorControl_FOC_R2017b_fixdt/filtLowPass/Low_Pass_Filter1'
|
|
||||||
*/
|
|
||||||
#endif /* RTW_HEADER_filtLowPass_h_ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,195 +0,0 @@
|
||||||
/*
|
|
||||||
* File: mixer.c
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'mixer'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1173
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Wed Oct 16 19:40:02 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "mixer.h"
|
|
||||||
#ifndef UCHAR_MAX
|
|
||||||
#include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
|
|
||||||
#error Code was generated for compiler with different sized uchar/char. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
|
|
||||||
#error Code was generated for compiler with different sized ushort/short. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized uint/int. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized ulong/long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Skip this size verification because of preprocessor limitation */
|
|
||||||
#if ( ULLONG_MAX != (0xFFFFFFFFFFFFFFFFULL) ) || ( LLONG_MAX != (0x7FFFFFFFFFFFFFFFLL) )
|
|
||||||
#error Code was generated for compiler with different sized ulong_long/long_long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void mixer_k(int16_T rtu_speed, int16_T rtu_steer, int16_T rtu_speed_coef,
|
|
||||||
int16_T rtu_steer_coef, int16_T *rty_speedR, int16_T
|
|
||||||
*rty_speedL);
|
|
||||||
|
|
||||||
/*===========*
|
|
||||||
* Constants *
|
|
||||||
*===========*/
|
|
||||||
#define RT_PI 3.14159265358979323846
|
|
||||||
#define RT_PIF 3.1415927F
|
|
||||||
#define RT_LN_10 2.30258509299404568402
|
|
||||||
#define RT_LN_10F 2.3025851F
|
|
||||||
#define RT_LOG10E 0.43429448190325182765
|
|
||||||
#define RT_LOG10EF 0.43429449F
|
|
||||||
#define RT_E 2.7182818284590452354
|
|
||||||
#define RT_EF 2.7182817F
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UNUSED_PARAMETER(x)
|
|
||||||
* Used to specify that a function parameter (argument) is required but not
|
|
||||||
* accessed by the function body.
|
|
||||||
*/
|
|
||||||
#ifndef UNUSED_PARAMETER
|
|
||||||
# if defined(__LCC__)
|
|
||||||
# define UNUSED_PARAMETER(x) /* do nothing */
|
|
||||||
# else
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the semi-ANSI standard way of indicating that an
|
|
||||||
* unused function parameter is required.
|
|
||||||
*/
|
|
||||||
# define UNUSED_PARAMETER(x) (void) (x)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Output and update for atomic system: '<Root>/mixer' */
|
|
||||||
void mixer_k(int16_T rtu_speed, int16_T rtu_steer, int16_T rtu_speed_coef,
|
|
||||||
int16_T rtu_steer_coef, int16_T *rty_speedR, int16_T *rty_speedL)
|
|
||||||
{
|
|
||||||
int16_T rtb_Divide1;
|
|
||||||
int16_T rtb_Divide2;
|
|
||||||
int32_T tmp;
|
|
||||||
|
|
||||||
/* Product: '<S1>/Divide1' */
|
|
||||||
rtb_Divide1 = (int16_T)((rtu_speed * rtu_speed_coef) >> 14);
|
|
||||||
|
|
||||||
/* Product: '<S1>/Divide2' */
|
|
||||||
rtb_Divide2 = (int16_T)((rtu_steer * rtu_steer_coef) >> 14);
|
|
||||||
|
|
||||||
/* Sum: '<S1>/Sum1' */
|
|
||||||
tmp = rtb_Divide1 - rtb_Divide2;
|
|
||||||
if (tmp > 32767) {
|
|
||||||
tmp = 32767;
|
|
||||||
} else {
|
|
||||||
if (tmp < -32768) {
|
|
||||||
tmp = -32768;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DataTypeConversion: '<S1>/Data Type Conversion2' incorporates:
|
|
||||||
* Sum: '<S1>/Sum1'
|
|
||||||
*/
|
|
||||||
*rty_speedR = (int16_T)(tmp >> 4);
|
|
||||||
|
|
||||||
/* Sum: '<S1>/Sum2' */
|
|
||||||
tmp = rtb_Divide1 + rtb_Divide2;
|
|
||||||
if (tmp > 32767) {
|
|
||||||
tmp = 32767;
|
|
||||||
} else {
|
|
||||||
if (tmp < -32768) {
|
|
||||||
tmp = -32768;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* DataTypeConversion: '<S1>/Data Type Conversion3' incorporates:
|
|
||||||
* Sum: '<S1>/Sum2'
|
|
||||||
*/
|
|
||||||
*rty_speedL = (int16_T)(tmp >> 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model step function */
|
|
||||||
void mixer_step(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
ExtU *rtU = (ExtU *) rtM->inputs;
|
|
||||||
ExtY *rtY = (ExtY *) rtM->outputs;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<Root>/mixer' */
|
|
||||||
|
|
||||||
/* Inport: '<Root>/speed' incorporates:
|
|
||||||
* Inport: '<Root>/speed_coef'
|
|
||||||
* Inport: '<Root>/steer'
|
|
||||||
* Inport: '<Root>/steer_coef'
|
|
||||||
* Outport: '<Root>/speedL'
|
|
||||||
* Outport: '<Root>/speedR'
|
|
||||||
*/
|
|
||||||
mixer_k(rtU->speed, rtU->steer, rtU->speed_coef, rtU->steer_coef, &rtY->speedR,
|
|
||||||
&rtY->speedL);
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<Root>/mixer' */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model initialize function */
|
|
||||||
void mixer_initialize(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
/* (no initialization code required) */
|
|
||||||
UNUSED_PARAMETER(rtM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* File: mixer.h
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'mixer'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1173
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Wed Oct 16 19:40:02 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RTW_HEADER_mixer_h_
|
|
||||||
#define RTW_HEADER_mixer_h_
|
|
||||||
#ifndef mixer_COMMON_INCLUDES_
|
|
||||||
# define mixer_COMMON_INCLUDES_
|
|
||||||
#include "rtwtypes.h"
|
|
||||||
#endif /* mixer_COMMON_INCLUDES_ */
|
|
||||||
|
|
||||||
/* Macros for accessing real-time model data structure */
|
|
||||||
|
|
||||||
/* Forward declaration for rtModel */
|
|
||||||
typedef struct tag_RTM RT_MODEL;
|
|
||||||
|
|
||||||
/* External inputs (root inport signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T speed; /* '<Root>/speed' */
|
|
||||||
int16_T steer; /* '<Root>/steer' */
|
|
||||||
int16_T speed_coef; /* '<Root>/speed_coef' */
|
|
||||||
int16_T steer_coef; /* '<Root>/steer_coef' */
|
|
||||||
} ExtU;
|
|
||||||
|
|
||||||
/* External outputs (root outports fed by signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T speedR; /* '<Root>/speedR' */
|
|
||||||
int16_T speedL; /* '<Root>/speedL' */
|
|
||||||
} ExtY;
|
|
||||||
|
|
||||||
/* Real-time Model Data Structure */
|
|
||||||
struct tag_RTM {
|
|
||||||
ExtU *inputs;
|
|
||||||
ExtY *outputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Model entry point functions */
|
|
||||||
extern void mixer_initialize(RT_MODEL *const rtM);
|
|
||||||
extern void mixer_step(RT_MODEL *const rtM);
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* These blocks were eliminated from the model due to optimizations:
|
|
||||||
*
|
|
||||||
* Block '<S1>/Data Type Conversion4' : Unused code path elimination
|
|
||||||
* Block '<S1>/Display' : Unused code path elimination
|
|
||||||
* Block '<S1>/Display1' : Unused code path elimination
|
|
||||||
* Block '<S1>/Display3' : Unused code path elimination
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* The generated code includes comments that allow you to trace directly
|
|
||||||
* back to the appropriate location in the model. The basic format
|
|
||||||
* is <system>/block_name, where system is the system number (uniquely
|
|
||||||
* assigned by Simulink) and block_name is the name of the block.
|
|
||||||
*
|
|
||||||
* Note that this particular code originates from a subsystem build,
|
|
||||||
* and has its own system numbers different from the parent model.
|
|
||||||
* Refer to the system hierarchy for this subsystem below, and use the
|
|
||||||
* MATLAB hilite_system command to trace the generated code back
|
|
||||||
* to the parent model. For example,
|
|
||||||
*
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/mixer') - opens subsystem BLDCmotorControl_FOC_R2017b_fixdt/mixer
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/mixer/Kp') - opens and selects block Kp
|
|
||||||
*
|
|
||||||
* Here is the system hierarchy for this model
|
|
||||||
*
|
|
||||||
* '<Root>' : 'BLDCmotorControl_FOC_R2017b_fixdt'
|
|
||||||
* '<S1>' : 'BLDCmotorControl_FOC_R2017b_fixdt/mixer'
|
|
||||||
*/
|
|
||||||
#endif /* RTW_HEADER_mixer_h_ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,17 +0,0 @@
|
||||||
%% Copyright 2018 The MathWorks, Inc.%%
|
|
||||||
clear all;
|
|
||||||
bdclose all;
|
|
||||||
clc;
|
|
||||||
%% PMSM parameters
|
|
||||||
Ld = 1.7e-3;
|
|
||||||
Lq = 3.2e-3;
|
|
||||||
Rs = 0.02;
|
|
||||||
Lambda_m = 0.2205;
|
|
||||||
Polepairs = 4;
|
|
||||||
|
|
||||||
%% Controller parameters
|
|
||||||
Iq_reference = 100;
|
|
||||||
Id_reference = -50;
|
|
||||||
Gain_P = 1;
|
|
||||||
Gain_I = 1;
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
%% Copyright 2018 The MathWorks, Inc.%%
|
|
||||||
clear all;
|
|
||||||
bdclose all;
|
|
||||||
clc;
|
|
||||||
%% PMSM parameters
|
|
||||||
Ld = 1.7e-3;
|
|
||||||
Lq = 3.2e-3;
|
|
||||||
Rs = 0.02;
|
|
||||||
Lambda_m = 0.2205;
|
|
||||||
Polepairs = 4;
|
|
||||||
|
|
||||||
%% Current Loop PI Controller parameters
|
|
||||||
|
|
||||||
Gain_P = 7.74;
|
|
||||||
Gain_I = 26.84;
|
|
||||||
|
|
||||||
%% Speed Loop PI Controller Parameters
|
|
||||||
Speed_Gain_P = 0.1;
|
|
||||||
Speed_Gain_I = 0.1;
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
1. All models are built in MATLAB R2018b. Prior releases cannot open them.
|
|
||||||
2. Before running the model, please first run the corresponding initialization file.
|
|
||||||
3. The initial PI Gain set for model_1 is not satisfactory. We are going to use SDO to tune the gains.
|
|
||||||
4. Copyright 2018 The MathWorks, Inc.
|
|
|
@ -1,26 +0,0 @@
|
||||||
Copyright (c) 2018, The MathWorks, Inc.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* In all cases, the software is, and all modifications and derivatives of the
|
|
||||||
software shall be, licensed to you solely for use in conjunction with
|
|
||||||
MathWorks products and service offerings.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
@ -1,191 +0,0 @@
|
||||||
/*
|
|
||||||
* File: rateLimiter.c
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'rateLimiter'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1186
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 27 16:29:07 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "rateLimiter.h"
|
|
||||||
#ifndef UCHAR_MAX
|
|
||||||
#include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
|
|
||||||
#error Code was generated for compiler with different sized uchar/char. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
|
|
||||||
#error Code was generated for compiler with different sized ushort/short. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized uint/int. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
|
|
||||||
#error Code was generated for compiler with different sized ulong/long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Skip this size verification because of preprocessor limitation */
|
|
||||||
#if ( ULLONG_MAX != (0xFFFFFFFFFFFFFFFFULL) ) || ( LLONG_MAX != (0x7FFFFFFFFFFFFFFFLL) )
|
|
||||||
#error Code was generated for compiler with different sized ulong_long/long_long. \
|
|
||||||
Consider adjusting Test hardware word size settings on the \
|
|
||||||
Hardware Implementation pane to match your compiler word sizes as \
|
|
||||||
defined in limits.h of the compiler. Alternatively, you can \
|
|
||||||
select the Test hardware is the same as production hardware option and \
|
|
||||||
select the Enable portable word sizes option on the Code Generation > \
|
|
||||||
Verification pane for ERT based targets, which will disable the \
|
|
||||||
preprocessor word size checks.
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int16_T rateLimiter_j(int16_T rtu_u, int16_T rtu_rate, DW_rateLimiter
|
|
||||||
*localDW);
|
|
||||||
|
|
||||||
/*===========*
|
|
||||||
* Constants *
|
|
||||||
*===========*/
|
|
||||||
#define RT_PI 3.14159265358979323846
|
|
||||||
#define RT_PIF 3.1415927F
|
|
||||||
#define RT_LN_10 2.30258509299404568402
|
|
||||||
#define RT_LN_10F 2.3025851F
|
|
||||||
#define RT_LOG10E 0.43429448190325182765
|
|
||||||
#define RT_LOG10EF 0.43429449F
|
|
||||||
#define RT_E 2.7182818284590452354
|
|
||||||
#define RT_EF 2.7182817F
|
|
||||||
|
|
||||||
/*
|
|
||||||
* UNUSED_PARAMETER(x)
|
|
||||||
* Used to specify that a function parameter (argument) is required but not
|
|
||||||
* accessed by the function body.
|
|
||||||
*/
|
|
||||||
#ifndef UNUSED_PARAMETER
|
|
||||||
# if defined(__LCC__)
|
|
||||||
# define UNUSED_PARAMETER(x) /* do nothing */
|
|
||||||
# else
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the semi-ANSI standard way of indicating that an
|
|
||||||
* unused function parameter is required.
|
|
||||||
*/
|
|
||||||
# define UNUSED_PARAMETER(x) (void) (x)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Output and update for atomic system: '<Root>/rateLimiter' */
|
|
||||||
int16_T rateLimiter_j(int16_T rtu_u, int16_T rtu_rate, DW_rateLimiter *localDW)
|
|
||||||
{
|
|
||||||
int16_T rtb_UnitDelay;
|
|
||||||
int16_T rtb_Sum1;
|
|
||||||
int16_T rtb_Gain;
|
|
||||||
int16_T rty_y_0;
|
|
||||||
|
|
||||||
/* UnitDelay: '<S2>/UnitDelay' */
|
|
||||||
rtb_UnitDelay = localDW->UnitDelay_DSTATE;
|
|
||||||
|
|
||||||
/* Sum: '<S2>/Sum1' incorporates:
|
|
||||||
* DataTypeConversion: '<S1>/Data Type Conversion1'
|
|
||||||
*/
|
|
||||||
rtb_Sum1 = (int16_T)((int16_T)(rtu_u << 4) - rtb_UnitDelay);
|
|
||||||
|
|
||||||
/* Switch: '<S3>/Switch2' incorporates:
|
|
||||||
* RelationalOperator: '<S3>/LowerRelop1'
|
|
||||||
*/
|
|
||||||
if (rtb_Sum1 > rtu_rate) {
|
|
||||||
rtb_Sum1 = rtu_rate;
|
|
||||||
} else {
|
|
||||||
/* Gain: '<S1>/Gain' */
|
|
||||||
rtb_Gain = (int16_T)-rtu_rate;
|
|
||||||
|
|
||||||
/* Switch: '<S3>/Switch' incorporates:
|
|
||||||
* RelationalOperator: '<S3>/UpperRelop'
|
|
||||||
*/
|
|
||||||
if (rtb_Sum1 < rtb_Gain) {
|
|
||||||
rtb_Sum1 = rtb_Gain;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of Switch: '<S3>/Switch' */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of Switch: '<S3>/Switch2' */
|
|
||||||
|
|
||||||
/* Sum: '<S2>/Sum2' */
|
|
||||||
rty_y_0 = (int16_T)(rtb_Sum1 + rtb_UnitDelay);
|
|
||||||
|
|
||||||
/* Update for UnitDelay: '<S2>/UnitDelay' */
|
|
||||||
localDW->UnitDelay_DSTATE = rty_y_0;
|
|
||||||
return rty_y_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model step function */
|
|
||||||
void rateLimiter_step(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
DW *rtDW = ((DW *) rtM->dwork);
|
|
||||||
ExtU *rtU = (ExtU *) rtM->inputs;
|
|
||||||
ExtY *rtY = (ExtY *) rtM->outputs;
|
|
||||||
|
|
||||||
/* Outputs for Atomic SubSystem: '<Root>/rateLimiter' */
|
|
||||||
|
|
||||||
/* Outport: '<Root>/y' incorporates:
|
|
||||||
* Inport: '<Root>/rate'
|
|
||||||
* Inport: '<Root>/u'
|
|
||||||
*/
|
|
||||||
rtY->y = (int16_T) rateLimiter_j(rtU->u, rtU->rate, &rtDW->rateLimiter_j0);
|
|
||||||
|
|
||||||
/* End of Outputs for SubSystem: '<Root>/rateLimiter' */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Model initialize function */
|
|
||||||
void rateLimiter_initialize(RT_MODEL *const rtM)
|
|
||||||
{
|
|
||||||
/* (no initialization code required) */
|
|
||||||
UNUSED_PARAMETER(rtM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,99 +0,0 @@
|
||||||
/*
|
|
||||||
* File: rateLimiter.h
|
|
||||||
*
|
|
||||||
* Code generated for Simulink model 'rateLimiter'.
|
|
||||||
*
|
|
||||||
* Model version : 1.1186
|
|
||||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
|
||||||
* C/C++ source code generated on : Sun Oct 27 16:29:07 2019
|
|
||||||
*
|
|
||||||
* Target selection: ert.tlc
|
|
||||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
|
||||||
* Emulation hardware selection:
|
|
||||||
* Differs from embedded hardware (MATLAB Host)
|
|
||||||
* Code generation objectives:
|
|
||||||
* 1. Execution efficiency
|
|
||||||
* 2. RAM efficiency
|
|
||||||
* Validation result: Not run
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RTW_HEADER_rateLimiter_h_
|
|
||||||
#define RTW_HEADER_rateLimiter_h_
|
|
||||||
#ifndef rateLimiter_COMMON_INCLUDES_
|
|
||||||
# define rateLimiter_COMMON_INCLUDES_
|
|
||||||
#include "rtwtypes.h"
|
|
||||||
#endif /* rateLimiter_COMMON_INCLUDES_ */
|
|
||||||
|
|
||||||
/* Macros for accessing real-time model data structure */
|
|
||||||
|
|
||||||
/* Forward declaration for rtModel */
|
|
||||||
typedef struct tag_RTM RT_MODEL;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>/rateLimiter' */
|
|
||||||
typedef struct {
|
|
||||||
int16_T UnitDelay_DSTATE; /* '<S2>/UnitDelay' */
|
|
||||||
} DW_rateLimiter;
|
|
||||||
|
|
||||||
/* Block signals and states (auto storage) for system '<Root>' */
|
|
||||||
typedef struct {
|
|
||||||
DW_rateLimiter rateLimiter_j0; /* '<Root>/rateLimiter' */
|
|
||||||
} DW;
|
|
||||||
|
|
||||||
/* External inputs (root inport signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T u; /* '<Root>/u' */
|
|
||||||
int16_T rate; /* '<Root>/rate' */
|
|
||||||
} ExtU;
|
|
||||||
|
|
||||||
/* External outputs (root outports fed by signals with auto storage) */
|
|
||||||
typedef struct {
|
|
||||||
int16_T y; /* '<Root>/y' */
|
|
||||||
} ExtY;
|
|
||||||
|
|
||||||
/* Real-time Model Data Structure */
|
|
||||||
struct tag_RTM {
|
|
||||||
ExtU *inputs;
|
|
||||||
ExtY *outputs;
|
|
||||||
DW *dwork;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Model entry point functions */
|
|
||||||
extern void rateLimiter_initialize(RT_MODEL *const rtM);
|
|
||||||
extern void rateLimiter_step(RT_MODEL *const rtM);
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* These blocks were eliminated from the model due to optimizations:
|
|
||||||
*
|
|
||||||
* Block '<S3>/Data Type Duplicate' : Unused code path elimination
|
|
||||||
* Block '<S3>/Data Type Propagation' : Unused code path elimination
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* The generated code includes comments that allow you to trace directly
|
|
||||||
* back to the appropriate location in the model. The basic format
|
|
||||||
* is <system>/block_name, where system is the system number (uniquely
|
|
||||||
* assigned by Simulink) and block_name is the name of the block.
|
|
||||||
*
|
|
||||||
* Note that this particular code originates from a subsystem build,
|
|
||||||
* and has its own system numbers different from the parent model.
|
|
||||||
* Refer to the system hierarchy for this subsystem below, and use the
|
|
||||||
* MATLAB hilite_system command to trace the generated code back
|
|
||||||
* to the parent model. For example,
|
|
||||||
*
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter') - opens subsystem BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter
|
|
||||||
* hilite_system('BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter/Kp') - opens and selects block Kp
|
|
||||||
*
|
|
||||||
* Here is the system hierarchy for this model
|
|
||||||
*
|
|
||||||
* '<Root>' : 'BLDCmotorControl_FOC_R2017b_fixdt'
|
|
||||||
* '<S1>' : 'BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter'
|
|
||||||
* '<S2>' : 'BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter/Rate_Limiter'
|
|
||||||
* '<S3>' : 'BLDCmotorControl_FOC_R2017b_fixdt/rateLimiter/Rate_Limiter/Saturation Dynamic'
|
|
||||||
*/
|
|
||||||
#endif /* RTW_HEADER_rateLimiter_h_ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* File trailer for generated code.
|
|
||||||
*
|
|
||||||
* [EOF]
|
|
||||||
*/
|
|
|
@ -1,244 +0,0 @@
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
% This file is part of the hoverboard-new-firmware-hack project
|
|
||||||
% Compared to previouse commutation method, this project implements
|
|
||||||
% FOC (Field Oriented Control) for BLDC motors with Hall sensors.
|
|
||||||
% The new control methods offers superior performanace
|
|
||||||
% compared to previous method featuring:
|
|
||||||
% >> reduced noise and vibrations
|
|
||||||
% >> smooth torque output
|
|
||||||
% >> improved motor efficiency -> lower energy consumption
|
|
||||||
%
|
|
||||||
% Author: Emanuel FERU
|
|
||||||
% Copyright © 2019 Emanuel FERU <aerdronix@gmail.com>
|
|
||||||
%
|
|
||||||
% This program is free software: you can redistribute it and/or modify
|
|
||||||
% it under the terms of the GNU General Public License as published by
|
|
||||||
% the Free Software Foundation, either version 3 of the License, or
|
|
||||||
% (at your option) any later version.
|
|
||||||
%
|
|
||||||
% This program is distributed in the hope that it will be useful,
|
|
||||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
% GNU General Public License for more details.
|
|
||||||
%
|
|
||||||
% You should have received a copy of the GNU General Public License
|
|
||||||
% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
% Clear workspace
|
|
||||||
close all
|
|
||||||
clear
|
|
||||||
clc
|
|
||||||
|
|
||||||
% Load model parameters
|
|
||||||
load BLDCmotorControl_data;
|
|
||||||
Ts = 5e-6; % [s] Model sampling time (200 kHz)
|
|
||||||
Ts_ctrl = 6e-5; % [s] Controller sampling time (~16 kHz)
|
|
||||||
f_ctrl = 16e3; % [Hz] Controller frequency = 1/Ts_ctrl (16 kHz)
|
|
||||||
% Ts_ctrl = 12e-5; % [s] Controller sampling time (~8 kHz)
|
|
||||||
|
|
||||||
% Motor parameters
|
|
||||||
n_polePairs = 15; % [-] Number of pole pairs
|
|
||||||
a_elecPeriod = 360; % [deg] Electrical angle period
|
|
||||||
a_elecAngle = 60; % [deg] Electrical angle between two Hall sensor changing events
|
|
||||||
a_mechAngle = a_elecAngle / n_polePairs; % [deg] Mechanical angle
|
|
||||||
r_whl = 6.5 * 2.54 * 1e-2 / 2; % [m] Wheel radius. Diameter = 6.5 inch (1 inch = 2.54 cm): Speed[kph] = rpm*(pi/30)*r_whl*3.6
|
|
||||||
i_sca = 50; % [-] [not tunable] Scalling factor A to int16 (50 = 1/0.02)
|
|
||||||
|
|
||||||
%% Control Manager
|
|
||||||
% Control type selection
|
|
||||||
CTRL_COM = 0; % [-] Commutation Control
|
|
||||||
CTRL_FOC = 1; % [-] Field Oriented Control (FOC)
|
|
||||||
z_ctrlTypSel = 1; % [-] Control Type Selection
|
|
||||||
|
|
||||||
% Control model request
|
|
||||||
OPEN_MODE = 0; % [-] Open mode
|
|
||||||
VLT_MODE = 1; % [-] Voltage mode
|
|
||||||
SPD_MODE = 2; % [-] Speed mode
|
|
||||||
TRQ_MODE = 3; % [-] Torque mode
|
|
||||||
z_ctrlModReq = 1; % [-] Control Mode Request
|
|
||||||
|
|
||||||
%% F01_Estimations
|
|
||||||
% Position Estimation Parameters
|
|
||||||
% Hall = 4*hA + 2*hB + hC
|
|
||||||
% Hall = [0 1 2 3 4 5 6 7]
|
|
||||||
vec_hallToPos = [0 2 0 1 4 3 5 0]; % [-] Mapping Hall signal to position
|
|
||||||
|
|
||||||
% Speed Calculation Parameters
|
|
||||||
cf_speedCoef = round(f_ctrl * a_mechAngle * (pi/180) * (30/pi)); % [-] Speed calculation coefficient (factors are due to conversions rpm <-> rad/s)
|
|
||||||
z_maxCntRst = 2000; % [-] Maximum counter value for reset (works also as time-out to detect standing still)
|
|
||||||
n_commDeacvHi = 30; % [rpm] Commutation method deactivation speed high
|
|
||||||
n_commAcvLo = 15; % [rpm] Commutation method activation speed low
|
|
||||||
dz_cntTrnsDetHi = 40; % [-] Counter gradient High for transient behavior detection (used for speed estimation)
|
|
||||||
dz_cntTrnsDetLo = 20; % [-] Counter gradient Low for steady state detection (used for speed estimation)
|
|
||||||
n_stdStillDet = 3; % [rpm] Speed threshold for Stand still detection
|
|
||||||
cf_currFilt = 0.02; % [%] Current filter coefficient [0, 1]. Lower values mean softer filter
|
|
||||||
cf_speedFilt = 0.20; % [%] Speed filter coefficient [0, 1]. Lower values mean softer filter
|
|
||||||
|
|
||||||
%% F02_Diagnostics
|
|
||||||
b_diagEna = 1; % [-] Diagnostics enable flag: 0 = Disabled, 1 = Enabled
|
|
||||||
t_errQual = 0.8 * f_ctrl; % [s] Error qualification time
|
|
||||||
t_errDequal = 2 * f_ctrl; % [s] Error dequalification time
|
|
||||||
i_errThres = 40 * i_sca; % [A] Maximum current threshold for phase current error detection
|
|
||||||
|
|
||||||
%% F04_Field_Oriented_Control
|
|
||||||
b_FfwdEna = 1; % [-] Feedforward enable flag: 0 = Disabled, 1 = Enabled
|
|
||||||
mot_Lq = 0; % [uH] Motor Q axis inductance
|
|
||||||
mot_Ld = 0; % [uH] Motor D axis inductance
|
|
||||||
mot_lambda = 0; % [mWb] Motor flux linkage
|
|
||||||
|
|
||||||
b_selPhaABCurrMeas = 1; % [-] Measured phase currents selection: {iA,iB} = 1; {iB,iC} = 0
|
|
||||||
i_thresOutlier = 200; % [-] Threshold for outlier detection in the current measurement
|
|
||||||
b_DCLinkCurrAvail = 0; % [-] Flag for DC Link current measurement availability
|
|
||||||
dV_openRate = 1000 * Ts_ctrl; % [V/s] Rate for voltage cut-off in Open Mode (Sample Time included in the rate)
|
|
||||||
|
|
||||||
% Field Weakening
|
|
||||||
b_fieldWeakEna = 0; % [-] Field weakening enable parameter: 0 = disable (default), 1 = enable
|
|
||||||
% id_fieldWeak_M1 = [ 0 0 0.25 0.5 1 2 3 4 4.5 4.8 5 5] * i_sca; % [-] Field weakening current map
|
|
||||||
% n_fieldWeak_XA = [200 250 300 350 400 450 500 550 600 650 700 750]; % [rpm] Motor speed grid
|
|
||||||
id_fieldWeak_M1 = [ 0 0 0.05 0.25 1 2 3 4 4.5 4.8 5 5] * i_sca; % [-] Field weakening current map
|
|
||||||
n_fieldWeak_XA = [400 420 440 460 480 500 520 540 560 580 600 620]; % [rpm] Motor speed grid
|
|
||||||
% figure
|
|
||||||
% plot(n_fieldWeak_XA, id_fieldWeak_M1, '.-'); hold on
|
|
||||||
% grid
|
|
||||||
|
|
||||||
% Sine wave look-up table
|
|
||||||
res_elecAngle = 2;
|
|
||||||
a_elecAngle_XA = 0:res_elecAngle:360; % [deg] Electrical angle grid
|
|
||||||
r_sin_M1 = sin((a_elecAngle_XA + 30)*(pi/180)); % Note: 30 deg shift is to allign it with the Hall sensors position
|
|
||||||
r_cos_M1 = cos((a_elecAngle_XA + 30)*(pi/180));
|
|
||||||
% figure
|
|
||||||
% stairs(a_elecAngle_XA, r_sin_M1); hold on
|
|
||||||
% stairs(a_elecAngle_XA, r_cos_M1);
|
|
||||||
% legend('sin','cos');
|
|
||||||
|
|
||||||
% Voltage Limitations
|
|
||||||
V_margin = 100; % [-] Voltage margin to make sure that there is a sufficiently wide pulse for a good phase current measurement
|
|
||||||
Vd_max = 1000 - V_margin;
|
|
||||||
Vq_max_XA = 0:20:Vd_max;
|
|
||||||
Vq_max_M1 = sqrt(Vd_max^2 - Vq_max_XA.^2); % Circle limitations look-up table
|
|
||||||
% figure
|
|
||||||
% stairs(Vq_max_XA, Vq_max_M1); legend('V_{max}');
|
|
||||||
|
|
||||||
% Current Limitations
|
|
||||||
iq_KpLimProt = 4; % [-] Current limit protection gain
|
|
||||||
iq_KiLimProt = 3 * Ts_ctrl; % [-] Current limit protection integral gain (only used in SPEED_MODE)
|
|
||||||
i_max = 15; % [A] Maximum allowed motor current (continuous)
|
|
||||||
i_max = i_max * i_sca;
|
|
||||||
iq_max_XA = 0:15:i_max;
|
|
||||||
iq_max_M1 = sqrt(i_max^2 - iq_max_XA.^2); % Circle limitations look-up table
|
|
||||||
% figure
|
|
||||||
% stairs(iq_max_XA, iq_max_M1); legend('i_{max}');
|
|
||||||
|
|
||||||
% Speed limitations
|
|
||||||
n_KpLimProt = 5; % [-] Speed limit protection gain
|
|
||||||
n_max = 800; % [rpm] Maximum motor speed
|
|
||||||
|
|
||||||
% PI control gains
|
|
||||||
n_Kp = 1;%5;
|
|
||||||
n_Ki = 10 * Ts_ctrl;%50 * Ts_ctrl; % Ts_ctrl embedded in Ki to avoid one multipilication in the controller
|
|
||||||
n_Kb = 1000 * Ts_ctrl;
|
|
||||||
|
|
||||||
iq_Kp = 0.5;
|
|
||||||
iq_Ki = 100 * Ts_ctrl;
|
|
||||||
iq_Kb = 1000 * Ts_ctrl;
|
|
||||||
|
|
||||||
id_Kp = 0.5;
|
|
||||||
id_Ki = 80 * Ts_ctrl;
|
|
||||||
id_Kb = 1000 * Ts_ctrl;
|
|
||||||
|
|
||||||
%% F05_Control_Type_Management
|
|
||||||
% Commutation method
|
|
||||||
z_commutMap_M1 = [-1 -1 0 1 1 0; % Phase A
|
|
||||||
1 0 -1 -1 0 1; % Phase B
|
|
||||||
0 1 1 0 -1 -1]; % Phase C [-] Commutation method map
|
|
||||||
|
|
||||||
% ***********************************************************************************
|
|
||||||
|
|
||||||
disp('---- BLDC_controller: Initialization OK ----');
|
|
||||||
|
|
||||||
%% Plot control methods
|
|
||||||
|
|
||||||
show_fig = 0;
|
|
||||||
sca_factor = 1000; % [-] scalling factor (to avoid truncation approximations on integer data type)
|
|
||||||
|
|
||||||
% Trapezoidal method
|
|
||||||
a_trapElecAngle_XA = [0 60 120 180 240 300 360]; % [deg] Electrical angle grid
|
|
||||||
r_trapPhaA_M1 = sca_factor*[ 1 1 1 -1 -1 -1 1];
|
|
||||||
r_trapPhaB_M1 = sca_factor*[-1 -1 1 1 1 -1 -1];
|
|
||||||
r_trapPhaC_M1 = sca_factor*[ 1 -1 -1 -1 1 1 1];
|
|
||||||
|
|
||||||
% Sinusoidal method
|
|
||||||
a_sinElecAngle_XA = 0:10:360;
|
|
||||||
omega = a_sinElecAngle_XA*(pi/180);
|
|
||||||
pha_adv = 30; % [deg] Phase advance to mach commands with the Hall position
|
|
||||||
r_sinPhaA_M1 = -sca_factor*sin(omega + pha_adv*(pi/180));
|
|
||||||
r_sinPhaB_M1 = -sca_factor*sin(omega - 120*(pi/180) + pha_adv*(pi/180));
|
|
||||||
r_sinPhaC_M1 = -sca_factor*sin(omega + 120*(pi/180) + pha_adv*(pi/180));
|
|
||||||
|
|
||||||
% SVM (Space Vector Modulation) calculation
|
|
||||||
SVM_vec = [r_sinPhaA_M1; r_sinPhaB_M1; r_sinPhaC_M1];
|
|
||||||
SVM_min = min(SVM_vec);
|
|
||||||
SVM_max = max(SVM_vec);
|
|
||||||
SVM_sum = SVM_min + SVM_max;
|
|
||||||
SVM_vec = SVM_vec - 0.5*SVM_sum;
|
|
||||||
SVM_vec = (2/sqrt(3))*SVM_vec;
|
|
||||||
|
|
||||||
if show_fig
|
|
||||||
|
|
||||||
hall_A = [0 0 0 1 1 1 1] + 4;
|
|
||||||
hall_B = [1 1 0 0 0 1 1] + 2;
|
|
||||||
hall_C = [0 1 1 1 0 0 0];
|
|
||||||
|
|
||||||
color = ['m' 'g' 'b'];
|
|
||||||
lw = 1.5;
|
|
||||||
figure
|
|
||||||
s1 = subplot(221); hold on
|
|
||||||
stairs(a_trapElecAngle_XA, hall_A, color(1), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, hall_B, color(2), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, hall_C, color(3), 'Linewidth', lw);
|
|
||||||
xticks(a_trapElecAngle_XA);
|
|
||||||
grid
|
|
||||||
yticks(0:5);
|
|
||||||
yticklabels({'0','1','0','1','0','1'});
|
|
||||||
title('Hall sensors');
|
|
||||||
legend('Phase A','Phase B','Phase C','Location','NorthEast');
|
|
||||||
|
|
||||||
s2 = subplot(222); hold on
|
|
||||||
stairs(a_trapElecAngle_XA, hall_A, color(1), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, hall_B, color(2), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, hall_C, color(3), 'Linewidth', lw);
|
|
||||||
xticks(a_trapElecAngle_XA);
|
|
||||||
grid
|
|
||||||
yticks(0:5);
|
|
||||||
yticklabels({'0','1','0','1','0','1'});
|
|
||||||
title('Hall sensors');
|
|
||||||
legend('Phase A','Phase B','Phase C','Location','NorthEast');
|
|
||||||
|
|
||||||
s3 = subplot(223); hold on
|
|
||||||
stairs(a_trapElecAngle_XA, sca_factor*[z_commutMap_M1(1,:) z_commutMap_M1(1,1)] + 6000, color(1), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, sca_factor*[z_commutMap_M1(2,:) z_commutMap_M1(2,1)] + 3000, color(2), 'Linewidth', lw);
|
|
||||||
stairs(a_trapElecAngle_XA, sca_factor*[z_commutMap_M1(3,:) z_commutMap_M1(3,1)], color(3), 'Linewidth', lw);
|
|
||||||
xticks(a_trapElecAngle_XA);
|
|
||||||
yticks(-1000:1000:7000);
|
|
||||||
yticklabels({'-1000','0','1000','-1000','0','1000','-1000','0','1000'});
|
|
||||||
ylim([-1000 7000]);
|
|
||||||
grid
|
|
||||||
title('Commutation method [0]');
|
|
||||||
xlabel('Electrical angle [deg]');
|
|
||||||
|
|
||||||
s4 = subplot(224); hold on
|
|
||||||
plot(a_sinElecAngle_XA, SVM_vec(1,:), color(1), 'Linewidth', lw);
|
|
||||||
plot(a_sinElecAngle_XA, SVM_vec(2,:), color(2), 'Linewidth', lw);
|
|
||||||
plot(a_sinElecAngle_XA, SVM_vec(3,:), color(3), 'Linewidth', lw);
|
|
||||||
xticks(a_trapElecAngle_XA);
|
|
||||||
ylim([-1000 1000])
|
|
||||||
grid
|
|
||||||
title('FOC method [1]');
|
|
||||||
xlabel('Electrical angle [deg]');
|
|
||||||
linkaxes([s1 s2 s3 s4],'x');
|
|
||||||
xlim([0 360]);
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
%% Parameters for Electric Engine Dyno Example
|
|
||||||
|
|
||||||
% This example shows how to model an electric vehicle dynamometer test.
|
|
||||||
% The test environment contains an asynchronous machine (ASM) and an
|
|
||||||
% interior permanent magnet synchronous machine (IPMSM) connected back-
|
|
||||||
% to-back through a mechanical shaft. Both machines are fed by high-
|
|
||||||
% voltage batteries through controlled three-phase converters. The 164 kW
|
|
||||||
% ASM produces the load torque. The 35 kW IPMSM is the electric machine
|
|
||||||
% under test. The Control Machine Under Test (IPMSM) subsystem controls the
|
|
||||||
% torque of the IPMSM. The controller includes a multi-rate PI-based
|
|
||||||
% control structure. The rate of the open-loop torque control is slower
|
|
||||||
% than the rate of the closed-loop current control. The task scheduling
|
|
||||||
% for the controller is implemented as a Stateflow(TM) state machine. The
|
|
||||||
% Control Load Machine (ASM) subsystem uses a single rate to control the
|
|
||||||
% speed of the ASM. The Visualization subsystem contains scopes that
|
|
||||||
% allow you to see the simulation results.
|
|
||||||
|
|
||||||
% Copyright 2016-2017 The MathWorks, Inc.
|
|
||||||
|
|
||||||
%% Machine Parameters
|
|
||||||
Pmax = 35000; % Maximum power [W]
|
|
||||||
Tmax = 205; % Maximum torque [N*m]
|
|
||||||
Ld = 0.00024368; % Stator d-axis inductance [H]
|
|
||||||
Lq = 0.00029758; % Stator q-axis inductance [H]
|
|
||||||
L0 = 0.00012184; % Stator zero-sequence inductance [H]
|
|
||||||
Rs = 0.010087; % Stator resistance per phase [Ohm]
|
|
||||||
psim = 0.04366; % Permanent magnet flux linkage [Wb]
|
|
||||||
p = 8; % Number of pole pairs
|
|
||||||
|
|
||||||
%% High-Voltage Battery Parameters
|
|
||||||
Cdc = 0.001; % DC-link capacitor [F]
|
|
||||||
Vnom = 325; % Nominal DC voltage[V]
|
|
||||||
V1 = 300; % Voltage V1(< Vnom)[V]
|
|
||||||
|
|
||||||
%% PMSM Control Parameters
|
|
||||||
Ts = 1e-5; % Fundamental sample time [s]
|
|
||||||
fsw = 10e3; % PMSM drive switching frequency [Hz]
|
|
||||||
Tsi = 1e-4; % Sample time for current control loops [s]
|
|
||||||
|
|
||||||
Kp_id = 0.8779; % Proportional gain id controller
|
|
||||||
Ki_id = 710.3004; % Integrator gain id controller
|
|
||||||
Kp_iq = 1.0744; % Proportional gain iq controller
|
|
||||||
Ki_iq = 1.0615e+03; % Integrator gain iq controller
|
|
||||||
|
|
||||||
%% Zero-Cancellation Transfer Functions
|
|
||||||
numd_id = Tsi/(Kp_id/Ki_id);
|
|
||||||
dend_id = [1 (Tsi-(Kp_id/Ki_id))/(Kp_id/Ki_id)];
|
|
||||||
numd_iq = Tsi/(Kp_iq/Ki_iq);
|
|
||||||
dend_iq = [1 (Tsi-(Kp_iq/Ki_iq))/(Kp_iq/Ki_iq)];
|
|
||||||
|
|
||||||
%% Current References
|
|
||||||
load pe_ipmsm_35kW_ref_idq;
|
|
||||||
|
|
||||||
%% ASM Parameters
|
|
||||||
Pn = 164e3; % Nominal power [W]
|
|
||||||
Vn = 550; % rms phase-to-phase rated voltage [V]
|
|
||||||
fn = 60; % Rated frequency [Hz]
|
|
||||||
|
|
||||||
Rs2 = 0.0139; % Stator resistance [pu]
|
|
||||||
Lls = 0.0672; % Stator leakage inductance [pu]
|
|
||||||
Rr = 0.0112; % Rotor resistance, referred to the stator side [pu]
|
|
||||||
Llr = 0.0672; % Rotor leakage inductance, referred to the stator side [pu]
|
|
||||||
Lm = 2.717; % Magnetizing inductance [pu]
|
|
||||||
Lr = Llr+Lm; % Rotor inductance [pu]
|
|
||||||
Ls = Lls+Lm; % Stator inductance [pu]
|
|
||||||
p2 = 2; % Number of pole pairs [pu]
|
|
||||||
|
|
||||||
Vbase = Vn/sqrt(3)*sqrt(2); % Base voltage, peak, line-to-neutral [V]
|
|
||||||
Ibase = Pn/(1.5*Vbase); % Base current, peak [A]
|
|
||||||
Zbase = Vbase/Ibase; % Base resistance [Ohm]
|
|
||||||
wbase = 2*pi*fn; % Base electrical radial frequency [rad/s]
|
|
||||||
Tbase = Pn/(wbase/p2); % Base torque [N*m]
|
|
||||||
|
|
||||||
Rss = Rs2*Zbase; % Stator resistance [Ohm]
|
|
||||||
Xls = Lls*Zbase; % Stator leakage reactance [Ohm]
|
|
||||||
Rrr = Rr*Zbase; % Rotor resistance, referred to the stator side [Ohm]
|
|
||||||
Xlr = Llr*Zbase; % Rotor leakage reactance, referred to the stator side[Ohm]
|
|
||||||
Xm = Lm*Zbase; % Magnetizing reactance [Ohm]
|
|
||||||
|
|
||||||
%% ASM Control Parameters
|
|
||||||
fsw2 = 2e3; % ASM drive switching frequency [Hz]
|
|
||||||
Tsc = 1/(fsw2*5); % ASM control sample time [s]
|
|
||||||
|
|
||||||
% ASM PI parameters
|
|
||||||
Kp_ids = 1.08;
|
|
||||||
Ki_ids = 207.58;
|
|
||||||
Kp_imr = 52.22;
|
|
||||||
Ki_imr = 2790.51;
|
|
||||||
Kp_iqs = 1.08;
|
|
||||||
Ki_iqs = 210.02;
|
|
||||||
Kp_wr = 10;
|
|
||||||
Ki_wr = 100;
|
|
||||||
|
|
||||||
%% Coupling Parameters
|
|
||||||
Jm = 0.1234; % Inertia [Kg*m^2]
|
|
||||||
ce = 25; % Damping coefficient [N*m/(rad/s)]
|
|
|
@ -1,190 +0,0 @@
|
||||||
dgrid is available under *either* the terms of the modified BSD license *or* the
|
|
||||||
Academic Free License version 2.1. As a recipient of dgrid, you may choose which
|
|
||||||
license to receive this code under.
|
|
||||||
|
|
||||||
The text of the AFL and BSD licenses is reproduced below.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
The "New" BSD License:
|
|
||||||
**********************
|
|
||||||
|
|
||||||
Copyright (c) 2010-2013, The Dojo Foundation
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the Dojo Foundation nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this software
|
|
||||||
without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
The Academic Free License, v. 2.1:
|
|
||||||
**********************************
|
|
||||||
|
|
||||||
This Academic Free License (the "License") applies to any original work of
|
|
||||||
authorship (the "Original Work") whose owner (the "Licensor") has placed the
|
|
||||||
following notice immediately following the copyright notice for the Original
|
|
||||||
Work:
|
|
||||||
|
|
||||||
Licensed under the Academic Free License version 2.1
|
|
||||||
|
|
||||||
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
|
|
||||||
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
|
|
||||||
following:
|
|
||||||
|
|
||||||
a) to reproduce the Original Work in copies;
|
|
||||||
|
|
||||||
b) to prepare derivative works ("Derivative Works") based upon the Original
|
|
||||||
Work;
|
|
||||||
|
|
||||||
c) to distribute copies of the Original Work and Derivative Works to the
|
|
||||||
public;
|
|
||||||
|
|
||||||
d) to perform the Original Work publicly; and
|
|
||||||
|
|
||||||
e) to display the Original Work publicly.
|
|
||||||
|
|
||||||
2) Grant of Patent License. Licensor hereby grants You a world-wide,
|
|
||||||
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
|
|
||||||
claims owned or controlled by the Licensor that are embodied in the Original
|
|
||||||
Work as furnished by the Licensor, to make, use, sell and offer for sale the
|
|
||||||
Original Work and Derivative Works.
|
|
||||||
|
|
||||||
3) Grant of Source Code License. The term "Source Code" means the preferred
|
|
||||||
form of the Original Work for making modifications to it and all available
|
|
||||||
documentation describing how to modify the Original Work. Licensor hereby
|
|
||||||
agrees to provide a machine-readable copy of the Source Code of the Original
|
|
||||||
Work along with each copy of the Original Work that Licensor distributes.
|
|
||||||
Licensor reserves the right to satisfy this obligation by placing a
|
|
||||||
machine-readable copy of the Source Code in an information repository
|
|
||||||
reasonably calculated to permit inexpensive and convenient access by You for as
|
|
||||||
long as Licensor continues to distribute the Original Work, and by publishing
|
|
||||||
the address of that information repository in a notice immediately following
|
|
||||||
the copyright notice that applies to the Original Work.
|
|
||||||
|
|
||||||
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
|
|
||||||
of any contributors to the Original Work, nor any of their trademarks or
|
|
||||||
service marks, may be used to endorse or promote products derived from this
|
|
||||||
Original Work without express prior written permission of the Licensor. Nothing
|
|
||||||
in this License shall be deemed to grant any rights to trademarks, copyrights,
|
|
||||||
patents, trade secrets or any other intellectual property of Licensor except as
|
|
||||||
expressly stated herein. No patent license is granted to make, use, sell or
|
|
||||||
offer to sell embodiments of any patent claims other than the licensed claims
|
|
||||||
defined in Section 2. No right is granted to the trademarks of Licensor even if
|
|
||||||
such marks are included in the Original Work. Nothing in this License shall be
|
|
||||||
interpreted to prohibit Licensor from licensing under different terms from this
|
|
||||||
License any Original Work that Licensor otherwise would have a right to
|
|
||||||
license.
|
|
||||||
|
|
||||||
5) This section intentionally omitted.
|
|
||||||
|
|
||||||
6) Attribution Rights. You must retain, in the Source Code of any Derivative
|
|
||||||
Works that You create, all copyright, patent or trademark notices from the
|
|
||||||
Source Code of the Original Work, as well as any notices of licensing and any
|
|
||||||
descriptive text identified therein as an "Attribution Notice." You must cause
|
|
||||||
the Source Code for any Derivative Works that You create to carry a prominent
|
|
||||||
Attribution Notice reasonably calculated to inform recipients that You have
|
|
||||||
modified the Original Work.
|
|
||||||
|
|
||||||
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
|
|
||||||
the copyright in and to the Original Work and the patent rights granted herein
|
|
||||||
by Licensor are owned by the Licensor or are sublicensed to You under the terms
|
|
||||||
of this License with the permission of the contributor(s) of those copyrights
|
|
||||||
and patent rights. Except as expressly stated in the immediately proceeding
|
|
||||||
sentence, the Original Work is provided under this License on an "AS IS" BASIS
|
|
||||||
and WITHOUT WARRANTY, either express or implied, including, without limitation,
|
|
||||||
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
|
|
||||||
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
|
|
||||||
license to Original Work is granted hereunder except under this disclaimer.
|
|
||||||
|
|
||||||
8) Limitation of Liability. Under no circumstances and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise, shall the
|
|
||||||
Licensor be liable to any person for any direct, indirect, special, incidental,
|
|
||||||
or consequential damages of any character arising as a result of this License
|
|
||||||
or the use of the Original Work including, without limitation, damages for loss
|
|
||||||
of goodwill, work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses. This limitation of liability shall not
|
|
||||||
apply to liability for death or personal injury resulting from Licensor's
|
|
||||||
negligence to the extent applicable law prohibits such limitation. Some
|
|
||||||
jurisdictions do not allow the exclusion or limitation of incidental or
|
|
||||||
consequential damages, so this exclusion and limitation may not apply to You.
|
|
||||||
|
|
||||||
9) Acceptance and Termination. If You distribute copies of the Original Work or
|
|
||||||
a Derivative Work, You must make a reasonable effort under the circumstances to
|
|
||||||
obtain the express assent of recipients to the terms of this License. Nothing
|
|
||||||
else but this License (or another written agreement between Licensor and You)
|
|
||||||
grants You permission to create Derivative Works based upon the Original Work
|
|
||||||
or to exercise any of the rights granted in Section 1 herein, and any attempt
|
|
||||||
to do so except under the terms of this License (or another written agreement
|
|
||||||
between Licensor and You) is expressly prohibited by U.S. copyright law, the
|
|
||||||
equivalent laws of other countries, and by international treaty. Therefore, by
|
|
||||||
exercising any of the rights granted to You in Section 1 herein, You indicate
|
|
||||||
Your acceptance of this License and all of its terms and conditions.
|
|
||||||
|
|
||||||
10) Termination for Patent Action. This License shall terminate automatically
|
|
||||||
and You may no longer exercise any of the rights granted to You by this License
|
|
||||||
as of the date You commence an action, including a cross-claim or counterclaim,
|
|
||||||
against Licensor or any licensee alleging that the Original Work infringes a
|
|
||||||
patent. This termination provision shall not apply for an action alleging
|
|
||||||
patent infringement by combinations of the Original Work with other software or
|
|
||||||
hardware.
|
|
||||||
|
|
||||||
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
|
|
||||||
License may be brought only in the courts of a jurisdiction wherein the
|
|
||||||
Licensor resides or in which Licensor conducts its primary business, and under
|
|
||||||
the laws of that jurisdiction excluding its conflict-of-law provisions. The
|
|
||||||
application of the United Nations Convention on Contracts for the International
|
|
||||||
Sale of Goods is expressly excluded. Any use of the Original Work outside the
|
|
||||||
scope of this License or after its termination shall be subject to the
|
|
||||||
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
|
|
||||||
seq., the equivalent laws of other countries, and international treaty. This
|
|
||||||
section shall survive the termination of this License.
|
|
||||||
|
|
||||||
12) Attorneys Fees. In any action to enforce the terms of this License or
|
|
||||||
seeking damages relating thereto, the prevailing party shall be entitled to
|
|
||||||
recover its costs and expenses, including, without limitation, reasonable
|
|
||||||
attorneys' fees and costs incurred in connection with such action, including
|
|
||||||
any appeal of such action. This section shall survive the termination of this
|
|
||||||
License.
|
|
||||||
|
|
||||||
13) Miscellaneous. This License represents the complete agreement concerning
|
|
||||||
the subject matter hereof. If any provision of this License is held to be
|
|
||||||
unenforceable, such provision shall be reformed only to the extent necessary to
|
|
||||||
make it enforceable.
|
|
||||||
|
|
||||||
14) Definition of "You" in This License. "You" throughout this License, whether
|
|
||||||
in upper or lower case, means an individual or a legal entity exercising rights
|
|
||||||
under, and complying with all of the terms of, this License. For legal
|
|
||||||
entities, "You" includes any entity that controls, is controlled by, or is
|
|
||||||
under common control with you. For purposes of this definition, "control" means
|
|
||||||
(i) the power, direct or indirect, to cause the direction or management of such
|
|
||||||
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
|
||||||
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
|
|
||||||
entity.
|
|
||||||
|
|
||||||
15) Right to Use. You may use the Original Work in all ways not otherwise
|
|
||||||
restricted or conditioned by this License or by law, and Licensor promises not
|
|
||||||
to interfere with or be responsible for such uses by You.
|
|
||||||
|
|
||||||
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
|
|
||||||
Permission is hereby granted to copy and distribute this license without
|
|
||||||
modification. This license may not be modified without the express written
|
|
||||||
permission of its copyright owner.
|
|
|
@ -1 +0,0 @@
|
||||||
.touchscroll-x, .touchscroll-y {display: none; overflow: hidden; position: absolute; opacity: 0.7;}.touchscroll-fadeout .touchscroll-x, .touchscroll-fadeout .touchscroll-y {opacity: 0; -webkit-transition: opacity 0.3s ease-out 0.1s; -moz-transition: opacity 0.3s ease-out 0.1s; -o-transition: opacity 0.3s ease-out 0.1s; transition: opacity 0.3s ease-out 0.1s;}.touchscroll-bar {background-color: rgba(88,88,88,0.97); border: 1px solid rgba(88,88,88,1); border-radius: 3px; -webkit-box-shadow: 0 0 1px rgba(88,88,88,0.4);}.touchscroll-x {left: 1px; right: 3px; bottom: 1px; height: 5px;}.touchscroll-y {top: 1px; bottom: 3px; right: 1px; width: 5px;}.touchscroll-scrollable-x .touchscroll-x, .touchscroll-scrollable-y .touchscroll-y {display: block;}.touchscroll-bar {-webkit-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); -moz-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); -o-transition: transform cubic-bezier(0.33, 0.66, 0.66, 1); transition: transform cubic-bezier(0.33, 0.66, 0.66, 1);}#dgrid-css-TouchScroll-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-column-set {overflow: hidden; width: 100%; position: relative; height: 100%;}.dgrid-column-set-cell {vertical-align: top; height: 100%;}.dgrid-column-set-scroller-container {font-size: 0; position: absolute; bottom: 0;}.dgrid-autoheight .dgrid-column-set-scroller-container {position: relative;}.dgrid-column-set-scroller {display: inline-block; overflow-x: auto; overflow-y: hidden;}.dgrid-column-set-scroller-content {height: 1px;}html.has-mozilla .dgrid-column-set *:focus, html.has-safari .dgrid-column-set *:focus {border: 1px dotted black; outline: 1px dotted black;}html.has-ie-7 .dgrid-column-set {width: auto;}html.has-quirks .dgrid-column-set {width: 100%;}#dgrid-css-columnset-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid {position: relative; overflow: hidden; border: 1px solid #ddd; height: 30em; display: block;}.dgrid-header {background-color: #eee;}.dgrid-header-row {position: absolute; right: 17px; left: 0;}.dgrid-header-scroll {position: absolute; top: 0; right: 0;}.dgrid-footer {position: absolute; bottom: 0; width: 100%;}.dgrid-header-hidden,html.has-quirks .dgrid-header-hidden .dgrid-cell {font-size: 0; height: 0 !important; border-top: none !important; border-bottom: none !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;}.dgrid-footer-hidden {display: none;}.dgrid-sortable {cursor: pointer;}.dgrid-header, .dgrid-header-row, .dgrid-footer {overflow: hidden; background-color: #eee;}.dgrid-row-table {border-collapse: collapse; border: none; table-layout: fixed; empty-cells: show; width: 100%; height: 100%;}.dgrid-cell {padding: 0px; text-align: left; overflow: hidden; vertical-align: top; border: 1px solid #ddd; border-top-style: none; box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box;}.dgrid-cell-padding {padding: 3px;}.dgrid-content {position: relative; height: 99%;}.dgrid-scroller {overflow-x: auto; overflow-y: scroll; position: absolute; top: 0px; margin-top: 25px; bottom: 0px; width: 100%;}.dgrid-preload {font-size: 0; line-height: 0;}.dgrid-loading {position: relative; height: 100%;}.dgrid-above {position: absolute; bottom: 0;}.ui-icon {width: 16px; height: 16px; background-image: url('images/ui-icons_222222_256x240.png');}.ui-icon-triangle-1-e {background-position: -32px -16px;}.ui-icon-triangle-1-se {background-position: -48px -16px;}.dgrid-expando-icon {width: 16px; height: 16px;}.dgrid-tree-container {-webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; -ms-transition-duration: 0.3s; -o-transition-duration: 0.3s; transition-duration: 0.3s; overflow: hidden;}.dgrid-tree-container.dgrid-tree-resetting {-webkit-transition-duration: 0; -moz-transition-duration: 0; -ms-transition-duration: 0; -o-transition-duration: 0; transition-duration: 0;}.dgrid-sort-arrow {background-position: -64px -16px; display: block; float: right; margin: 0 4px 0 5px; height: 12px;}.dgrid-sort-up .dgrid-sort-arrow {background-position: 0px -16px;}.dgrid-selected {background-color: #bfd6eb;}.dgrid-input {width: 99%;}html.has-mozilla .dgrid *:focus, html.has-opera .dgrid *:focus {outline: 1px dotted;}html.has-ie-6-7.has-no-quirks .dgrid-row-table {width: auto;}html.has-quirks .dgrid-row-table, html.has-ie-6 .dgrid-row-table {height: auto;}html.has-quirks .dgrid-header-scroll,html.has-ie-6 .dgrid-header-scroll {font-size: 0;}html.has-mozilla .dgrid-focus {outline-offset: -1px;}.dgrid-scrollbar-measure {width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;}.dgrid-autoheight {height: auto;}.dgrid-autoheight .dgrid-scroller {position: relative; overflow-y: hidden;}.dgrid-autoheight .dgrid-header-scroll {display: none;}.dgrid-autoheight .dgrid-header {right: 0;}#dgrid-css-dgrid-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-rtl-swap .dgrid-header-row {right: 0; left: 17px;}.dgrid-rtl-swap .dgrid-header-scroll {left: 0px; right: auto;}.dgrid-rtl .dgrid-cell {text-align: right;}.dgrid-rtl .dgrid-sort-arrow {float: left; margin: 0 5px 0 4px;}.dgrid-rtl .ui-icon-triangle-1-e {background-position: -96px -16px;}.dgrid-rtl .ui-icon-triangle-1-se {background-position: -80px -16px;}.dgrid-rtl .dgrid-pagination .dgrid-status {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-page-size {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-navigation {float: left;}.dgrid-rtl.dgrid-autoheight .dgrid-header {left: 0;}.has-ie-6 .dgrid-rtl .dgrid-header-row {left: auto; right: auto;}#dgrid-css-dgrid_rtl-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-hider-toggle {background-position: 0 -192px; background-color: transparent; border: none; cursor: pointer; position: absolute; right: 0; top: 0;}.dgrid-rtl-swap .dgrid-hider-toggle {right: auto; left: 0;}.dgrid-hider-menu {position: absolute; top: 0; right: 17px; width: 184px; background-color: #fff; border: 1px solid black; z-index: 99999; padding: 4px; overflow-x: hidden; overflow-y: auto;}.dgrid-rtl-swap .dgrid-hider-menu {right: auto; left: 17px;}.dgrid-hider-menu-row {position: relative; padding: 2px;}.dgrid-hider-menu-check {position: absolute; top: 2px; left: 2px; padding: 0;}.dgrid-hider-menu-label {display: block; padding-left: 20px;}html.has-quirks .dgrid-hider-menu-check,html.has-ie-6-7 .dgrid-hider-menu-check {top: 0; left: 0;}#dgrid-css-extensions-ColumnHider-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-header .dojoDndContainer .dgrid-cell {display: table-cell;}.dgrid-header .dojoDndItemBefore {border-left: 2px dotted #000 !important;}.dgrid-header .dojoDndItemAfter {border-right: 2px dotted #000 !important;}#dgrid-css-extensions-ColumnReorder-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-column-resizer {cursor: col-resize; position: absolute; width: 2px; background-color: #666; z-index: 1000;}.dgrid-resize-guard {cursor: col-resize; position: absolute; bottom: 0; left: 0; right: 0; top: 0;}.dgrid-resize-handle {height: 100px; width: 0; position: absolute; right: -4px; top:-4px; cursor: col-resize; z-index: 999; border-left: 5px solid transparent; outline: none;}html.has-ie-6 .dgrid-resize-handle {border-color: pink; filter: chroma(color=pink);}html.has-mozilla .dgrid .dgrid-resize-handle:focus,html.has-opera .dgrid .dgrid-resize-handle:focus {outline: none;}.dgrid-resize-header-container {height:100%;}html.has-touch .dgrid-resize-handle {border-left: 20px solid transparent;}html.has-touch .dgrid-column-resizer {width: 2px;}html.has-no-quirks .dgrid-resize-header-container {position: relative;}html.has-ie-6 .dgrid-resize-header-container {position: static;}.dgrid-header .dgrid-cell-padding {overflow: hidden;}html.has-ie-6 .dgrid-header .dgrid-cell-padding {margin-right: 4px;}html.has-ie-6 .dgrid-header .dgrid-sort-arrow {margin-right: 0;}html.has-quirks .dgrid-header .dgrid-cell-padding, html.has-ie-6 .dgrid-header .dgrid-cell {position:relative;}#dgrid-css-extensions-ColumnResizer-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-spacer-row {height: 0;}.dgrid-spacer-row th {padding-top: 0; padding-bottom: 0; border-top: none; border-bottom: none;}#dgrid-css-extensions-CompoundColumns-loaded {display: none;}
|
|
|
@ -1 +0,0 @@
|
||||||
.dgrid-status {padding: 2px;}.dgrid-pagination .dgrid-status {float: left;}.dgrid-pagination .dgrid-navigation, .dgrid-pagination .dgrid-page-size {float: right;}.dgrid-navigation .dgrid-page-link {cursor: pointer; font-weight: bold; text-decoration: none; color: inherit; padding: 0 4px;}.dgrid-first, .dgrid-last, .dgrid-next, .dgrid-previous {font-size: 130%;}.dgrid-pagination .dgrid-page-disabled,.has-ie-6-7 .dgrid-navigation .dgrid-page-disabled,.has-ie.has-quirks .dgrid-navigation .dgrid-page-disabled {color: #aaa; cursor: default;}.dgrid-page-input {margin-top: 1px; width: 2em; text-align: center;}.dgrid-page-size {margin: 1px 4px 0 4px;}#dgrid-css-extensions-Pagination-loaded {display: none;}
|
|
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.9 KiB |
|
@ -1 +0,0 @@
|
||||||
.cactus .dgrid-content {border: none; background: #faffef; color: #000;}.cactus .dgrid-header-row {border-bottom: none;}.cactus .dgrid-header,.cactus .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.cactus .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.cactus .dgrid-cell {border-color: #bbc581; border-top: none; border-right: none; border-left: none;}.cactus .dgrid-row-even {border-top: 1px solid #FFF;}.cactus .dgrid-row-odd {background: #9a6; background-image: -moz-linear-gradient(top, rgba(185,203,127,1) 0%, rgba(143,160,91,1) 100%); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(185,203,127,1)), color-stop(100%,rgba(143,160,91,1))); background-image: -webkit-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: -o-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: -ms-linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); background-image: linear-gradient(top, rgba(185,203,127,1) 0%,rgba(143,160,91,1) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b9cb7f', endColorstr='#8fa05b',GradientType=0 ); text-shadow: 0 1px 0 rgba(255,255,255,.9); border-top: 1px solid #ccd595; color: #FFF; text-shadow: 0 -1px 0 rgba(0,0,0,.3);}.cactus .dgrid-row-odd .dgrid-cell {border-top: 1px solid #e9efbd;}.cactus .dgrid-row:hover,.cactus .dgrid-row:hover .dgrid-cell {background: #555; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #555;}.cactus .dgrid-selected,.cactus .dgrid-selected .dgrid-cell {background: #333; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #333;}.cactus .dgrid-selected:hover {background: #333; border-color: #333;}.cactus .dgrid-highlight {background: #d6e5a5; filter: none; color: #000; text-shadow: none;}.cactus .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.cactus .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.cactus .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .cactus .dgrid-navigation a,.has-ie.has-quirks .cactus .dgrid-navigation a {color: #fff;}
|
|
|
@ -1 +0,0 @@
|
||||||
.claro .dgrid {border: 1px solid #aaa; background: #fff; color: #000;}.claro .dgrid-header {font-weight: bold;}.claro .dgrid-header,.claro .dgrid-footer {background: #ebf0f5; background: -moz-linear-gradient(top, #ebf0f5 0%, #d5e0ea 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebf0f5), color-stop(100%,#d5e0ea)); background: -webkit-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: -o-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: -ms-linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); background: linear-gradient(top, #ebf0f5 0%,#d5e0ea 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebf0f5', endColorstr='#d5e0ea',GradientType=0 );}.claro .dgrid-header .dgrid-cell:hover {background: #ebf1f6; background: -moz-linear-gradient(top, #ffffff 0%, #d2e0eb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d2e0eb)); background: -webkit-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: -o-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: -ms-linear-gradient(top, #ffffff 0%,#d2e0eb 100%); background: linear-gradient(top, #ffffff 0%,#d2e0eb 100%);}.claro .dgrid-row {-webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; -o-transition-duration: 0.2s; transition-duration: 0.2s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; -o-transition-property: background-color, border-color; transition-property: background-color, border-color; background: url("images/row_back.png") #fff repeat-x;}.has-ie-6 .claro .dgrid-row {background-image: none;}.claro .dgrid-row:hover {background-color: #e9f2fe;}.claro .dgrid-selected {background-color: #cee6fa;}.claro .dgrid-selected:hover {background-color: #9bc6f2;}.claro .dgrid-highlight {background-color: #ff6;}.claro .dgrid-cell {border-color: #edc;}.claro .dgrid-header .dgrid-cell {border-color: #bbb;}
|
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1 +0,0 @@
|
||||||
.nihilo .dgrid {border-color: #bba;}.nihilo .dgrid-content {background: #fff; color: #000;}.nihilo .dgrid-header {background: #fff; border-bottom-color: #919191;}.nihilo .dgrid-footer {background: #fff; border-top: 1px solid #919191;}.nihilo .dgrid-header .dgrid-cell {border-right-color: #acab99;}.nihilo .dgrid-selected {background-color: #aec7e3;}.nihilo .dgrid-row:hover {background-color: #ffe284;}.nihilo .dgrid-highlight {background-color: #ff6;}.nihilo .dgrid-cell {border-color: #ddc;}.nihilo .dgrid-header .dgrid-cell {border-color: #bba;}
|
|
|
@ -1 +0,0 @@
|
||||||
.sage .dgrid-content {border: none; background: #fff; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,.9);}.sage .dgrid-header-row {border-bottom: none;}.sage .dgrid-header,.sage .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.sage .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.sage .dgrid-cell {border-color: #bbc581; border-top: none; border-right: none; border-left: none;}.sage .dgrid-row-odd {background: #f2f7e8;}.sage .dgrid-row:hover {background: #c5dca6; color: #333; text-shadow: 0 1px 0 rgba(255,255,255,.5);}.sage .dgrid-row {-webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color;}.sage .dgrid-selected,.sage .dgrid-selected:hover {background: #b3d18b; text-shadow: 0 1px 0 rgba(255,255,255,.6);}.sage .dgrid-highlight {background-color: #d5e8bd;}.sage .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.sage .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.sage .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .sage .dgrid-navigation a,.has-ie.has-quirks .sage .dgrid-navigation a {color: #fff;}
|
|
|
@ -1 +0,0 @@
|
||||||
.slate .dgrid-content {background: #fff; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,.9);}.slate .dgrid-header-row {border-bottom: none;}.slate .dgrid-header,.slate .dgrid-footer {color: #fff; background: #333; background: -moz-linear-gradient(top, #4e4e4e 0%, #555555 12%, #636363 25%, #505050 39%, #303030 49%, #000000 50%, #1c1c1c 60%, #292929 76%, #1e1e1e 91%, #141414 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4e4e4e), color-stop(12%,#555555), color-stop(25%,#636363), color-stop(39%,#505050), color-stop(49%,#303030), color-stop(50%,#000000), color-stop(60%,#1c1c1c), color-stop(76%,#292929), color-stop(91%,#1e1e1e), color-stop(100%,#141414)); background: -webkit-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -o-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: -ms-linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); background: linear-gradient(top, #4e4e4e 0%,#555555 12%,#636363 25%,#505050 39%,#303030 49%,#000000 50%,#1c1c1c 60%,#292929 76%,#1e1e1e 91%,#141414 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4e4e4e', endColorstr='#141414',GradientType=0 );}.slate .dgrid-header th {padding: 7px 3px; font-weight: bold; color: #FFF; text-shadow: 0 -1px 0 rgba(0,0,0,.9); border-color: #111; text-transform: uppercase;}.slate .dgrid-row-odd {background-color: #f7f7f7;}.slate .dgrid-row:hover {background-color: #ddd;}.slate .dgrid-selected,.slate .dgrid-selected:hover {background-color: #555; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5);}.slate .dgrid-highlight {background-color: #999;}.slate .dgrid-sort-arrow {background-image: url("../images/ui-icons_ffffff_256x240.png");}.slate .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.slate .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .slate .dgrid-navigation a,.has-ie.has-quirks .slate .dgrid-navigation a {color: #fff;}
|
|
|
@ -1 +0,0 @@
|
||||||
.soria .dgrid {border-color: #bba;}.soria .dgrid-content {background: #fff; color: #000;}.soria .dgrid-header,.soria .dgrid-footer {background: #f2f4fe; background: -moz-linear-gradient(top, #f2f4fe 0%, #d0dff5 50%, #c6d8f0 51%, #c2d5ef 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f4fe), color-stop(50%,#d0dff5), color-stop(51%,#c6d8f0), color-stop(100%,#c2d5ef)); background: -webkit-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: -o-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: -ms-linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); background: linear-gradient(top, #f2f4fe 0%,#d0dff5 50%,#c6d8f0 51%,#c2d5ef 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f4fe', endColorstr='#c2d5ef',GradientType=0 );}.soria .dgrid-header th:hover {background: #d4deec; background: -moz-linear-gradient(top, #dae2ed 0%, #b2c7e8 49%, #a8c1eb 50%, #9ebaec 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dae2ed), color-stop(49%,#b2c7e8), color-stop(50%,#a8c1eb), color-stop(100%,#9ebaec)); background: -webkit-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: -o-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: -ms-linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%); background: linear-gradient(top, #dae2ed 0%,#b2c7e8 49%,#a8c1eb 50%,#9ebaec 100%);}.soria .dgrid-selected {background-color: #aec7e3;}.soria .dgrid-row:hover {background-color: #60a1ea;}.soria .dgrid-highlight {background-color: #ff6;}.soria .dgrid-cell {border-color: #ddc;}.soria .dgrid-header .dgrid-cell {border-color: #bba;}
|
|
|
@ -1 +0,0 @@
|
||||||
.squid .dgrid-content {border: 1px solid #555; background: #000; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.7);}.squid .ui-icon {background-image: url("../images/ui-icons_ffffff_256x240.png");}.squid .dgrid-header {padding: 0 1px;}.squid .dgrid-header,.squid .dgrid-footer {color: #fff; background: #2d1f14; background: -moz-linear-gradient(top, #140e09 0%, #2d1f14 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#140e09), color-stop(100%,#2d1f14)); background: -webkit-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: -o-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: -ms-linear-gradient(top, #140e09 0%,#2d1f14 100%); background: linear-gradient(top, #140e09 0%,#2d1f14 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#140e09', endColorstr='#2d1f14',GradientType=0 ); color: #fff; font-weight: bold;}.squid .dgrid-header:hover {background: #000; background: -moz-linear-gradient(top, #000000 0%, #2d1f14 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#2d1f14)); background: -webkit-linear-gradient(top, #000000 0%,#2d1f14 100%); background: -o-linear-gradient(top, #000000 0%,#2d1f14 100%); background: -ms-linear-gradient(top, #000000 0%,#2d1f14 100%); background: linear-gradient(top, #000000 0%,#2d1f14 100%);}.squid .dgrid-row {-webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color; background: url("images/row_back.png") #000 repeat-x;}.squid .dgrid-row:hover {background-color: #444;}.has-ie-6 .squid .dgrid-row {background-image: none;}.squid .dgrid-selected {background-color: #64390d; text-shadow: 0 -1px 0 rgba(0,0,0,.3);}.squid .dgrid-selected:hover {background-color: #8b6b4a;}.squid .dgrid-highlight {background-color: #666;}.squid .dgrid-cell {border-color: #ccc;}.squid .dgrid-header .dojoDndItemBefore {border-left: 2px dotted #fff !important;}.squid .dgrid-header .dojoDndItemAfter {border-right: 2px dotted #fff !important;}.has-ie-6-7 .squid .dgrid-navigation a,.has-ie.has-quirks .squid .dgrid-navigation a {color: #fff;}
|
|
|
@ -1 +0,0 @@
|
||||||
.tundra .dgrid {border-color: #bba;}.tundra .dgrid-content {background: #fff; color: #000;}.tundra .dgrid-header, .tundra .dgrid-footer {background: #e8e8e8; background: -moz-linear-gradient(top, #ffffff 0%, #e8e8e8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e8e8e8)); background: -webkit-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: -o-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#e8e8e8 100%); background: linear-gradient(top, #ffffff 0%,#e8e8e8 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e8e8e8',GradientType=0 ); font-weight: bold;}.tundra .dgrid-header th:hover {background: #f6f6f6; background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eeeeee)); background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 100%); background: linear-gradient(top, #ffffff 0%,#eeeeee 100%);}.tundra .dgrid-selected {background-color: #aec7e3;}.tundra .dgrid-row:hover {background-color: #60a1ea;}.tundra .dgrid-highlight {background-color: #ff6;}.tundra .dgrid-cell {border-color: #ddc;}.tundra .dgrid-header .dgrid-cell {border-color: #bba;}
|
|
|
@ -1,195 +0,0 @@
|
||||||
Dojo is available under *either* the terms of the modified BSD license *or* the
|
|
||||||
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
|
|
||||||
license to receive this code under (except as noted in per-module LICENSE
|
|
||||||
files). Some modules may not be the copyright of the Dojo Foundation. These
|
|
||||||
modules contain explicit declarations of copyright in both the LICENSE files in
|
|
||||||
the directories in which they reside and in the code itself. No external
|
|
||||||
contributions are allowed under licenses which are fundamentally incompatible
|
|
||||||
with the AFL or BSD licenses that Dojo is distributed under.
|
|
||||||
|
|
||||||
The text of the AFL and BSD licenses is reproduced below.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
The "New" BSD License:
|
|
||||||
**********************
|
|
||||||
|
|
||||||
Copyright (c) 2005-2016, The Dojo Foundation
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the Dojo Foundation nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this software
|
|
||||||
without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
The Academic Free License, v. 2.1:
|
|
||||||
**********************************
|
|
||||||
|
|
||||||
This Academic Free License (the "License") applies to any original work of
|
|
||||||
authorship (the "Original Work") whose owner (the "Licensor") has placed the
|
|
||||||
following notice immediately following the copyright notice for the Original
|
|
||||||
Work:
|
|
||||||
|
|
||||||
Licensed under the Academic Free License version 2.1
|
|
||||||
|
|
||||||
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
|
|
||||||
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
|
|
||||||
following:
|
|
||||||
|
|
||||||
a) to reproduce the Original Work in copies;
|
|
||||||
|
|
||||||
b) to prepare derivative works ("Derivative Works") based upon the Original
|
|
||||||
Work;
|
|
||||||
|
|
||||||
c) to distribute copies of the Original Work and Derivative Works to the
|
|
||||||
public;
|
|
||||||
|
|
||||||
d) to perform the Original Work publicly; and
|
|
||||||
|
|
||||||
e) to display the Original Work publicly.
|
|
||||||
|
|
||||||
2) Grant of Patent License. Licensor hereby grants You a world-wide,
|
|
||||||
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
|
|
||||||
claims owned or controlled by the Licensor that are embodied in the Original
|
|
||||||
Work as furnished by the Licensor, to make, use, sell and offer for sale the
|
|
||||||
Original Work and Derivative Works.
|
|
||||||
|
|
||||||
3) Grant of Source Code License. The term "Source Code" means the preferred
|
|
||||||
form of the Original Work for making modifications to it and all available
|
|
||||||
documentation describing how to modify the Original Work. Licensor hereby
|
|
||||||
agrees to provide a machine-readable copy of the Source Code of the Original
|
|
||||||
Work along with each copy of the Original Work that Licensor distributes.
|
|
||||||
Licensor reserves the right to satisfy this obligation by placing a
|
|
||||||
machine-readable copy of the Source Code in an information repository
|
|
||||||
reasonably calculated to permit inexpensive and convenient access by You for as
|
|
||||||
long as Licensor continues to distribute the Original Work, and by publishing
|
|
||||||
the address of that information repository in a notice immediately following
|
|
||||||
the copyright notice that applies to the Original Work.
|
|
||||||
|
|
||||||
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
|
|
||||||
of any contributors to the Original Work, nor any of their trademarks or
|
|
||||||
service marks, may be used to endorse or promote products derived from this
|
|
||||||
Original Work without express prior written permission of the Licensor. Nothing
|
|
||||||
in this License shall be deemed to grant any rights to trademarks, copyrights,
|
|
||||||
patents, trade secrets or any other intellectual property of Licensor except as
|
|
||||||
expressly stated herein. No patent license is granted to make, use, sell or
|
|
||||||
offer to sell embodiments of any patent claims other than the licensed claims
|
|
||||||
defined in Section 2. No right is granted to the trademarks of Licensor even if
|
|
||||||
such marks are included in the Original Work. Nothing in this License shall be
|
|
||||||
interpreted to prohibit Licensor from licensing under different terms from this
|
|
||||||
License any Original Work that Licensor otherwise would have a right to
|
|
||||||
license.
|
|
||||||
|
|
||||||
5) This section intentionally omitted.
|
|
||||||
|
|
||||||
6) Attribution Rights. You must retain, in the Source Code of any Derivative
|
|
||||||
Works that You create, all copyright, patent or trademark notices from the
|
|
||||||
Source Code of the Original Work, as well as any notices of licensing and any
|
|
||||||
descriptive text identified therein as an "Attribution Notice." You must cause
|
|
||||||
the Source Code for any Derivative Works that You create to carry a prominent
|
|
||||||
Attribution Notice reasonably calculated to inform recipients that You have
|
|
||||||
modified the Original Work.
|
|
||||||
|
|
||||||
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
|
|
||||||
the copyright in and to the Original Work and the patent rights granted herein
|
|
||||||
by Licensor are owned by the Licensor or are sublicensed to You under the terms
|
|
||||||
of this License with the permission of the contributor(s) of those copyrights
|
|
||||||
and patent rights. Except as expressly stated in the immediately proceeding
|
|
||||||
sentence, the Original Work is provided under this License on an "AS IS" BASIS
|
|
||||||
and WITHOUT WARRANTY, either express or implied, including, without limitation,
|
|
||||||
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
|
|
||||||
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
|
|
||||||
license to Original Work is granted hereunder except under this disclaimer.
|
|
||||||
|
|
||||||
8) Limitation of Liability. Under no circumstances and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise, shall the
|
|
||||||
Licensor be liable to any person for any direct, indirect, special, incidental,
|
|
||||||
or consequential damages of any character arising as a result of this License
|
|
||||||
or the use of the Original Work including, without limitation, damages for loss
|
|
||||||
of goodwill, work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses. This limitation of liability shall not
|
|
||||||
apply to liability for death or personal injury resulting from Licensor's
|
|
||||||
negligence to the extent applicable law prohibits such limitation. Some
|
|
||||||
jurisdictions do not allow the exclusion or limitation of incidental or
|
|
||||||
consequential damages, so this exclusion and limitation may not apply to You.
|
|
||||||
|
|
||||||
9) Acceptance and Termination. If You distribute copies of the Original Work or
|
|
||||||
a Derivative Work, You must make a reasonable effort under the circumstances to
|
|
||||||
obtain the express assent of recipients to the terms of this License. Nothing
|
|
||||||
else but this License (or another written agreement between Licensor and You)
|
|
||||||
grants You permission to create Derivative Works based upon the Original Work
|
|
||||||
or to exercise any of the rights granted in Section 1 herein, and any attempt
|
|
||||||
to do so except under the terms of this License (or another written agreement
|
|
||||||
between Licensor and You) is expressly prohibited by U.S. copyright law, the
|
|
||||||
equivalent laws of other countries, and by international treaty. Therefore, by
|
|
||||||
exercising any of the rights granted to You in Section 1 herein, You indicate
|
|
||||||
Your acceptance of this License and all of its terms and conditions.
|
|
||||||
|
|
||||||
10) Termination for Patent Action. This License shall terminate automatically
|
|
||||||
and You may no longer exercise any of the rights granted to You by this License
|
|
||||||
as of the date You commence an action, including a cross-claim or counterclaim,
|
|
||||||
against Licensor or any licensee alleging that the Original Work infringes a
|
|
||||||
patent. This termination provision shall not apply for an action alleging
|
|
||||||
patent infringement by combinations of the Original Work with other software or
|
|
||||||
hardware.
|
|
||||||
|
|
||||||
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
|
|
||||||
License may be brought only in the courts of a jurisdiction wherein the
|
|
||||||
Licensor resides or in which Licensor conducts its primary business, and under
|
|
||||||
the laws of that jurisdiction excluding its conflict-of-law provisions. The
|
|
||||||
application of the United Nations Convention on Contracts for the International
|
|
||||||
Sale of Goods is expressly excluded. Any use of the Original Work outside the
|
|
||||||
scope of this License or after its termination shall be subject to the
|
|
||||||
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
|
|
||||||
seq., the equivalent laws of other countries, and international treaty. This
|
|
||||||
section shall survive the termination of this License.
|
|
||||||
|
|
||||||
12) Attorneys Fees. In any action to enforce the terms of this License or
|
|
||||||
seeking damages relating thereto, the prevailing party shall be entitled to
|
|
||||||
recover its costs and expenses, including, without limitation, reasonable
|
|
||||||
attorneys' fees and costs incurred in connection with such action, including
|
|
||||||
any appeal of such action. This section shall survive the termination of this
|
|
||||||
License.
|
|
||||||
|
|
||||||
13) Miscellaneous. This License represents the complete agreement concerning
|
|
||||||
the subject matter hereof. If any provision of this License is held to be
|
|
||||||
unenforceable, such provision shall be reformed only to the extent necessary to
|
|
||||||
make it enforceable.
|
|
||||||
|
|
||||||
14) Definition of "You" in This License. "You" throughout this License, whether
|
|
||||||
in upper or lower case, means an individual or a legal entity exercising rights
|
|
||||||
under, and complying with all of the terms of, this License. For legal
|
|
||||||
entities, "You" includes any entity that controls, is controlled by, or is
|
|
||||||
under common control with you. For purposes of this definition, "control" means
|
|
||||||
(i) the power, direct or indirect, to cause the direction or management of such
|
|
||||||
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
|
||||||
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
|
|
||||||
entity.
|
|
||||||
|
|
||||||
15) Right to Use. You may use the Original Work in all ways not otherwise
|
|
||||||
restricted or conditioned by this License or by law, and Licensor promises not
|
|
||||||
to interfere with or be responsible for such uses by You.
|
|
||||||
|
|
||||||
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
|
|
||||||
Permission is hereby granted to copy and distribute this license without
|
|
||||||
modification. This license may not be modified without the express written
|
|
||||||
permission of its copyright owner.
|
|
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 630 B |
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/ar/common", ({
|
|
||||||
buttonOk: "حسنا",
|
|
||||||
buttonCancel: "الغاء",
|
|
||||||
buttonSave: "حفظ",
|
|
||||||
itemClose: "اغلاق"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/ar/loading", ({
|
|
||||||
loadingState: "جاري التحميل...",
|
|
||||||
errorState: "عفوا، حدث خطأ"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/az/common", ({
|
|
||||||
"buttonOk" : "Ok",
|
|
||||||
"buttonCancel" : "Ləğv et",
|
|
||||||
"buttonSave" : "Saxla",
|
|
||||||
"itemClose" : "Bağla"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/az/loading", ({
|
|
||||||
"loadingState" : "Yüklənir...",
|
|
||||||
"errorState" : "Problem yarandı"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/bg/common", ({
|
|
||||||
buttonOk: "ОК",
|
|
||||||
buttonCancel: "Отмени",
|
|
||||||
buttonSave: "Запази",
|
|
||||||
itemClose: "Затвори"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/bg/loading", ({
|
|
||||||
loadingState: "Зареждане...",
|
|
||||||
errorState: "Съжаляваме, възникна грешка"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,9 +0,0 @@
|
||||||
define("dijit/nls/bs/common", {
|
|
||||||
//begin v1.x content
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Odustani",
|
|
||||||
buttonSave: "Spremi",
|
|
||||||
itemClose: "Zatvori"
|
|
||||||
//end v1.x content
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
define("dijit/nls/bs/loading", {
|
|
||||||
//begin v1.x content
|
|
||||||
loadingState: "Učitavanje...",
|
|
||||||
errorState: "Izvinite, došlo je do greške"
|
|
||||||
//end v1.x content
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/ca/common", ({
|
|
||||||
buttonOk: "D'acord",
|
|
||||||
buttonCancel: "Cancel·la",
|
|
||||||
buttonSave: "Desa",
|
|
||||||
itemClose: "Tanca"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/ca/loading", ({
|
|
||||||
loadingState: "S'està carregant...",
|
|
||||||
errorState: "Ens sap greu. S'ha produït un error."
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,49 +0,0 @@
|
||||||
define("dijit/nls/common", { root:
|
|
||||||
//begin v1.x content
|
|
||||||
({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Cancel",
|
|
||||||
buttonSave: "Save",
|
|
||||||
itemClose: "Close"
|
|
||||||
})
|
|
||||||
//end v1.x content
|
|
||||||
,
|
|
||||||
"bs": true,
|
|
||||||
"mk": true,
|
|
||||||
"sr": true,
|
|
||||||
"zh": true,
|
|
||||||
"zh-tw": true,
|
|
||||||
"uk": true,
|
|
||||||
"tr": true,
|
|
||||||
"th": true,
|
|
||||||
"sv": true,
|
|
||||||
"sl": true,
|
|
||||||
"sk": true,
|
|
||||||
"ru": true,
|
|
||||||
"ro": true,
|
|
||||||
"pt": true,
|
|
||||||
"pt-pt": true,
|
|
||||||
"pl": true,
|
|
||||||
"nl": true,
|
|
||||||
"nb": true,
|
|
||||||
"ko": true,
|
|
||||||
"kk": true,
|
|
||||||
"ja": true,
|
|
||||||
"it": true,
|
|
||||||
"id": true,
|
|
||||||
"hu": true,
|
|
||||||
"hr": true,
|
|
||||||
"he": true,
|
|
||||||
"fr": true,
|
|
||||||
"fi": true,
|
|
||||||
"eu": true,
|
|
||||||
"es": true,
|
|
||||||
"el": true,
|
|
||||||
"de": true,
|
|
||||||
"da": true,
|
|
||||||
"cs": true,
|
|
||||||
"ca": true,
|
|
||||||
"bg": true,
|
|
||||||
"az": true,
|
|
||||||
"ar": true
|
|
||||||
});
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/cs/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Storno",
|
|
||||||
buttonSave: "Uložit",
|
|
||||||
itemClose: "Zavřít"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/cs/loading", ({
|
|
||||||
loadingState: "Probíhá načítání...",
|
|
||||||
errorState: "Omlouváme se, došlo k chybě"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/da/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Annullér",
|
|
||||||
buttonSave: "Gem",
|
|
||||||
itemClose: "Luk"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/da/loading", ({
|
|
||||||
loadingState: "Indlæser...",
|
|
||||||
errorState: "Der er opstået en fejl"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/de/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Abbrechen",
|
|
||||||
buttonSave: "Speichern",
|
|
||||||
itemClose: "Schließen"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/de/loading", ({
|
|
||||||
loadingState: "Wird geladen...",
|
|
||||||
errorState: "Es ist ein Fehler aufgetreten."
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/el/common", ({
|
|
||||||
buttonOk: "ΟΚ",
|
|
||||||
buttonCancel: "Ακύρωση",
|
|
||||||
buttonSave: "Αποθήκευση",
|
|
||||||
itemClose: "Κλείσιμο"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/el/loading", ({
|
|
||||||
loadingState: "Φόρτωση...",
|
|
||||||
errorState: "Σας ζητούμε συγνώμη, παρουσιάστηκε σφάλμα"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/es/common", ({
|
|
||||||
buttonOk: "Aceptar",
|
|
||||||
buttonCancel: "Cancelar",
|
|
||||||
buttonSave: "Guardar",
|
|
||||||
itemClose: "Cerrar"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/es/loading", ({
|
|
||||||
loadingState: "Cargando...",
|
|
||||||
errorState: "Lo siento, se ha producido un error"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,9 +0,0 @@
|
||||||
define("dijit/nls/eu/common", {
|
|
||||||
//begin v1.x content
|
|
||||||
buttonOk: "Ados",
|
|
||||||
buttonCancel: "Utzi",
|
|
||||||
buttonSave: "Gorde",
|
|
||||||
itemClose: "Itxi"
|
|
||||||
//end v1.x content
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
define("dijit/nls/eu/loading", {
|
|
||||||
//begin v1.x content
|
|
||||||
loadingState: "Kargatzen...",
|
|
||||||
errorState: "Barkatu, errorea gertatu da"
|
|
||||||
//end v1.x content
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/fi/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Peruuta",
|
|
||||||
buttonSave: "Tallenna",
|
|
||||||
itemClose: "Sulje"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/fi/loading", ({
|
|
||||||
loadingState: "Lataus on meneillään...",
|
|
||||||
errorState: "On ilmennyt virhe."
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/fr/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Annuler",
|
|
||||||
buttonSave: "Enregistrer",
|
|
||||||
itemClose: "Fermer"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/fr/loading", ({
|
|
||||||
loadingState: "Chargement...",
|
|
||||||
errorState: "Une erreur est survenue"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/he/common", ({
|
|
||||||
buttonOk: "אישור",
|
|
||||||
buttonCancel: "ביטול",
|
|
||||||
buttonSave: "שמירה",
|
|
||||||
itemClose: "סגירה"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/he/loading", ({
|
|
||||||
loadingState: "טעינה...",
|
|
||||||
errorState: "אירעה שגיאה"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,8 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/hr/common", ({
|
|
||||||
buttonOk: "OK",
|
|
||||||
buttonCancel: "Opoziv",
|
|
||||||
buttonSave: "Spremi",
|
|
||||||
itemClose: "Zatvori"
|
|
||||||
})
|
|
||||||
);
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(
|
|
||||||
"dijit/nls/hr/loading", ({
|
|
||||||
loadingState: "Učitavanje...",
|
|
||||||
errorState: "Žao nam je, došlo je do greške"
|
|
||||||
})
|
|
||||||
);
|
|