mismatch

mismatch#

NeuromorphicControlToolbox.mismatch.set_options(varargin)#

Generates a mismatchOption based on the input Name-Value pairs.

Note: Exclusion (of blocks, mismatch or type) always take precedence over inclusion. Thus using an ‘all’ key in an exclusion option result in all types/mismatch to be eliminated.

Description:
  • mismatchOption = set_options(name, value, …) – Generate a new mismatchOption from the name-value options.

  • mismatchOption = set_options(mismatchOption, name, value, …) – Apply the name-value options to a given mismatchOption.

Inputs:
  • name (char or string) – Name of the option to set.

  • value (misc) – Value of the option to set.

Optional Input:

mismatchOption (struct) – Preexisting mismatchOption.

Output:

mismatchOption (struct) – Resulting structuring containing the preset options.

Name-Value Inputs:

'baseOptions': (char, string) – ‘on’ to specify adding the option defined by base_options().

'blockIncludeList': (char, cell(char), string) – path(s) to specific block(s) to include in mismatch.

'blockExcludeList': (char, cell(char), string) – path(s) to specific block(s) to exclude of mismatch.

'mismatchIncludeList': (char, cell(char), string) – specific mismatch(es) categories to include generation (special key ‘all’ available).

'mismatchExcludeList': (char, cell(char), string) – specific mismatch(es) categories to exclude generation (special key ‘all’ available).

'blockTypeIncludeList': (char, cell(char), string) – specific block type(s) to include in mismatch (special key ‘all’ available).

'blockTypeExcludeList': (char, cell(char), string) – specific block type(s) to exclude of mismatch (special key ‘all’ available).

'simParamList': (struct) – parameter value to apply to model before generating mismatch.

'mismatchFunctions': (containers.Map(char,containers.Map(char,function_handle))) – function(s) that apply mismatch to a specific block type.

NeuromorphicControlToolbox.mismatch.base_options(varargin)#

Generates a mismatchOption base configuration for blocks of the Simulink library.

Description:
  • mismatchOption = base_options() – Generates the base mismatchOption for the toolbox.

  • mismatchOption = base_options(mismatchOption) – Add to a custom mismatchOption the base mismatchOption for the toolbox.

  • mismatchOption = base_options(name, value, …) – Create a mismatchOption using the syntax of set_options() then add to it the base mismatchOption for the toolbox.

  • mismatchOption = base_options(mismatchOption, name, value) – Add to a custom mismatchOption then add name-value options using the syntax of set_options() then add to it the base mismatchOption for the toolbox.

Inputs:
  • name (char or string) – Name of the option to set.

  • value (misc) – Value of the option to set.

Optional Input:

mismatchOption (struct) – Preexisting mismatchOption.

Output:

mismatchOption (struct) – Resulting structuring containing the preset options.

Name-Value Inputs:

see set_options()

NeuromorphicControlToolbox.mismatch.apply_to_system(model, mismatchParams, varargin)#

Add mismatch to all neuromorphic blocks of a simulink model.

Description:
  • simIn = apply_to_system(model, mismatchParams) – Use the base mismatchOption defined by base_options() and generate a single Simulink.SimulationInput with mismatch applied.

  • simIn = apply_to_system(model, mismatchParams, nbSim) – Use the base mismatchOption defined by base_options() and generate a nbSim Simulink.SimulationInput with mismatch applied.

  • simIn = apply_to_system(model, mismatchParams, simIn) – Use the base mismatchOption defined by base_options() and returns the input Simulink.SimulationInput with mismatch applied.

  • simIn = apply_to_system(__, mismatchOption) – Give a custom mismatchOption that replaces the base mismatchOption.

  • simIn = apply_to_system(__, name, value, …) – Create a custom mismatchOption that replaces the base mismatchOption using the syntax of set_options().

  • simIn = apply_to_system(__, mismatchOption, name, value) – Give a custom mismatchOption that replaces the base mismatchOption and apply the name-value options using the syntax of set_options().

Inputs:
  • model (char or string) – Name of the model to mismatch.

  • mismatchParams (struct) – Parameter dictionary that is passed to the internal mismatch functions. Pass and empty dictionary with struct() if unecessary.

  • nbSim (int) – Number of Simulink.SimulationInput to generate.

  • simIn (Simulink.SimulationInput) – Simulink.SimulationInput configuration to apply the mismatch to.

Optional Input:
  • Name (char or string) – Name of the option to set.

  • Value (misc) – Value of the option to set.

  • MismatchOptionStruct (struct) – Preexisting MismatchOptionStruct.

Output:

simIn (Simulink.SimulationInput) – Resulting SimulationInput configuration.

Name-Value Inputs:

see set_options()