Variable Scope
What are Variables in Ruby?
June 8, 2015
Topics:
- What are Variables?
- How to use variables
- Types of variables
What are Variables?
Straight up. There is no other way to digest this. Variables are the memory locations holding data that can be used in the program. A variable can be seen as a place to store data. All variables are unique and they refer to a specific object located in memory and they do this by pointing to that object in memory wich is the famous definitions of "pointers."
variable=5
-> To access the variable it has a pointer that stores [5] in memory.
Type of variables?
There 5 types of variables in ruby that are:
- CONSTANT=5
- $global=5
- @@class=5
- @instance=5
- local=5
Constant variables are like normal varibles but it's value is supposed to remain the same thru out the whole program. Global variables can be accesed from anywhere in the program. Class varaibles exist over ALL instances of a class it is like saying that all instances from that class have something in common. Instance varaibles are variables that belong to each instance of the class. Local variables can be accessed on the block where it was defined only.
How to use variables
Let's take for example local variables.
def information
  name=andres
  age=andres
  info=[name,age]
  return info
end
They can be accessed only in the information method scope. We can se here how we return the array that we assigned a variable with the name of info.
Updates are coming soon! To make it this blog cool $ style ish.
@devgmtech


dtw: Dynamic Time Warping Algorithms
A comprehensive implementation of dynamic time warping (DTW) algorithms in R. DTW computes the optimal (least cumulative distance) alignment between points of two time series. Common DTW variants covered include local (slope) and global (window) constraints, subsequence matches, arbitrary distance definitions, normalizations, minimum variance matching, and so on. Provides cumulative distances, alignments, specialized plot styles, etc.
Downloads:
Reverse dependencies:
| Reverse depends: |
dtwclust, verification |
| Reverse imports: |
classiFunc, DTWBI, dtwSat, DTWUMI, MarketMatching, mtconnectR, phylocurve, Seurat, soundgen, TSclust, TSdist, warbleR |
| Reverse suggests: |
ChemometricsWithR, IncDTW, parallelDist, refund, rucrdtw |
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=dtw
to link to this page.


Toggle navigation
POS
Product
People
Customers
Categories
Orders
Setting
Reports
Hide Header
Show Header
Show
10
25
50
100
entries
Search:
×
{{message}}
Id
Category
Sub Category
Name
Model No
Brand
Price
HSN Code
BAR Code
Quantity
Action
{{user.id}}
{{user.category}}
{{user.subcategory}}
{{user.name}}
{{user.modelno}}
{{user.brand}}
{{user.price}}
{{user.hsncode}}
{{user.barcode}}
Action
Delete
Place Order
<< Previous
{{currentPage+1}}{{numberOfPages()}}
Next >>
×
Add Product
ID
Category
Sub Category
Name
Model No
Brand Name
Price (INR)
HSN Code
BAR Code
Quantity
×
Add Product
ID
Category
Sub Category
Name
Model No
Brand Name
Price (INR)
HSN Code
BAR Code
Quantity
×
Delete User Registration
Your going to delete {{clickedUser.phone}}. All Information.....
×
Place Order
Order Placed Successfully
ID
001
NAME
ashok
DATE
{{current_date_format}}


Please enter the information used to access your server.
The RSS token can be generated from your 'My Profile' screen inside SpiraTeam. For further assistance contact your system administrator
The template is currently configured to:
, .
Quick Help Guide
Logging into SpiraTeam
Enter your SpiraTeam URL
Please enter the web address that you use to access SpiraTeam® in your browser. This is usually of the form 'http://(hostname)/SpiraTeam'. Make sure that you remove any suffixes from the address (e.g. Default.aspx)
Enter your user name
Please enter the user name you use to log in to SpiraTeam. (Not Case Sensitive)
Enter your RSS token
Please enter your RSS token including the curly braces i.e {ExampleRSS}
Actions
Help
This button will open an in app help menu with basic functionality information.
Logout
This button will close your connection with SpiraTeam and clear your data. WARNING: your spreadsheet data will be erased as a security measure on disconnect.
Clear
This button will clear the contents of your current tab including the template.
Projects
Select a project from the menu.
Artifacts
Select an artifact from the menu.
Load Template
Click this button to generate the template for the project and artifact you’ve selected.
Save
Clicking this button will save your current spreadsheet information into a new tab.
Send to SpiraTeam
This button will send your properly formatted data to SpiraTeam and it will be added to the current project.
Import to SpiraTeamNot Currently Supported
Required Fields
Required fields are marked by their name in the title row shown as bold black text (standard fields are regular light text)
For test steps, required fields are shown in black, but not bold text.
Help For Specific Fields
ID Fields
Stores the id of the item. This field MUST be left blank to add new items to SpiraTeam
Test Step Fields
have their header row shown in a lighter background color. Note that the description field is used for both test cases (not required) and steps (required). If the system cannot tell whether an entry is a test case or step it is skipped over when sending to Spira.
Name
For REQUIREMENTS and RELEASES this field supports indentation, add a “ > “ symbol to indicate how the items in the artifact hierarchy are organized.
Example:
Item 1
>Item 2 child of item 1
>Item 3 child of item 1
>>Item 4 child of item 3
CommentsNot Currently Supported
Custom Field Entries
Text
Enter any text. Include HTML tags for rich text.
Decimal
Enter any positive number.
Integer
Enter a non-decimal number.
Date
Enter the date in any standard format.
List
Select a value from the dropdown list.
MultiList
Select an item from the provided list. This is not currently supported


Pikels
clear
Humidity
Chance of rain
Next 24 hours
Next 7 days
Pikels is powered by
Darksky API
. Icons by
Freepik
.


NAME: JAMILA, ANEKKE
BRAND: SXDjr
MODEL NUMBER: 888-11-6905
CONTROLLER SERIAL: SXD-888-11-6905
FIRMWARE: 8.5.0 beta 6
OCCUPATION: COURTESAN UNIT [RETROFIT]
PLACE OF MANUFACTURE: [REDACTED]
COMPANY OF MANUFACTURE: [REDACTED]
SPECIFICATIONS


| Total net profit | 15.16 | Gross profit | 17.01 | Gross loss | -1.85 |
| Profit factor | 9.19 | Expected payoff | 3.79 | ||
| Absolute drawdown | 5.78 | Maximal drawdown (%) | 1.85 (10.88%) | ||
| Total trades | 4 | Profit trades (% of total) | 3 (75.0%) | Loss trades (% of total) | 1 (25.0%) |
| Long positions (won %) | 1 (100.0%) | Short positions (won %) | 3 (66.67%) | ||
| Largest | profit trade | 8.69 | loss trade | -1.85 | |
| Average | profit trade | 5.67 | loss trade | -1.85 | |
| Minimum | profit trade | 2.54 | loss trade | -1.85 | |
| Maximum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Average | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Minimum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Maximum | Reward-Risk | 0.0 | Duration in minutes | 5502 | |
| Average | Reward-Risk | 0.0 | Duration in minutes | 2833.8 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 263 | |
| Maximum | consecutive wins (profit in money) | 3.0 (17.01) | consecutive losses (loss in money) | 1.0 (-1.85) | |
| Average | consecutive wins | 3.0 | consecutive losses | 1.0 |
| Total net profit | 2.54 | Gross profit | 2.54 | Gross loss | 0.0 |
| Profit factor | 0.0 | Expected payoff | 2.54 | ||
| Absolute drawdown | 0.0 | Maximal drawdown (%) | 0.0 (0.0%) | ||
| Total trades | 1 | Profit trades (% of total) | 1 (100.0%) | Loss trades (% of total) | 0 (0.0%) |
| Largest | profit trade | 2.54 | loss trade | 0.0 | |
| Average | profit trade | 2.54 | loss trade | 0.0 | |
| Minimum | profit trade | 2.54 | loss trade | 0.0 | |
| Maximum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Average | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Minimum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Maximum | Reward-Risk | 0.0 | Duration in minutes | 263.0 | |
| Average | Reward-Risk | 0.0 | Duration in minutes | 263.0 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 263.0 | |
| Maximum | consecutive wins (profit in money) | 1.0 (2.54) | consecutive losses (loss in money) | 0.0 (0.0) | |
| Average | consecutive wins | 1.0 | consecutive losses | 0.0 |
| Total net profit | 12.62 | Gross profit | 14.47 | Gross loss | -1.85 |
| Profit factor | 7.82 | Expected payoff | 4.21 | ||
| Absolute drawdown | 5.78 | Maximal drawdown (%) | 1.85 (12.79%) | ||
| Total trades | 3 | Profit trades (% of total) | 2 (66.67%) | Loss trades (% of total) | 1 (33.33%) |
| Largest | profit trade | 8.69 | loss trade | -1.85 | |
| Average | profit trade | 7.23 | loss trade | -1.85 | |
| Minimum | profit trade | 5.78 | loss trade | -1.85 | |
| Maximum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Average | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Minimum | take profit in pips | 0.0 | stop loss in pips | 0.0 | |
| Maximum | Reward-Risk | 0.0 | Duration in minutes | 5502.0 | |
| Average | Reward-Risk | 0.0 | Duration in minutes | 3690.7 | |
| Minimum | Reward-Risk | Duration in minutes | 453.0 | ||
| Maximum | consecutive wins (profit in money) | 2.0 (14.47) | consecutive losses (loss in money) | 1.0 (-1.85) | |
| Average | consecutive wins | 2.0 | consecutive losses | 1.0 |


Welcome to our wedding page!
Wedding Date: Sept. 27, 2021.
Welcome to our wedding page!
Wedding Date: Sept. 27, 2021.
Photos
Home
Details
Location
Photos
RSVP


In 1954, a handful of Palestinian immigrants on Chicago’s famous Southside established the Mosque Foundation of Chicago with the dream of one day building a structure to house the religious and cultural activities of their growing young families. Today, that dream is reality as the Mosque Foundation has become one of the busiest mosques in America, serving a community of more than 50,000 Muslims.
Built in 1981 on a few acres of swampy land in the middle of mostly abandoned prairie in Bridgeview, the Mosque Foundation began as a small structure with a maximum prayer hall capacity of 300 worshippers. No one could foresee that the mosque’s establishment would inspire a Muslim neighborhood of hundreds of beautiful new homes around the mosque, two full-time Islamic schools at its perimeters, a Community Center down the road, and dozens of thriving businesses.
The community has steadily diversified to include Muslims of many languages and experiences—all praying side-by-side. Imams are active in education, counseling, spiritual guidance, and arbitration. Community members work with local and national Islamic, interfaith, and civic organizations on numerous initiatives such as protecting American civil liberties, empowering Muslims, improving the quality of urban life, and helping the poor, the immigrants, and the oppressed by advocating for justice and peace.
Very early on, Chicago area Muslims rented various sites around the south side of Chicago to hold congregational Eid Prayers and celebrations. Friday prayers were sometimes held in storefront properties of Muslim-owned businesses. As the population of the Muslim community grew, the need was realized to purchase property. So, in 1963, a church located at 6500 S. Steward Avenue was purchased and converted into a prayer hall and school for the community of more than a hundred Arab Muslim families living in the southwest side of Chicago at the time. Arabic language and religion classes were held in the Steward property, as well as various community functions. Several years later, the building was sold to purchase a storefront property at 79th and Clyde Avenue.
The Clyde property was sold shortly thereafter, with the proceeds reserved to purchase land in Bridgeview, where the Mosque currently stands. Designs of the Mosque were presented in 1977, and construction began in November 1978. Three years later, in 1981, the doors to the Mosque Foundation were officially opened, and the first congregational prayers were held. All five daily obligatory prayers and Friday congregational prayers were offered from the start, as well as nightly Taraweeh prayers during the month of Ramadan. Quran recitation classes, Hadith lectures, and regular monthly meetings were established to serve the spiritual and social needs of the community.
It is impossible to overestimate the impact the Mosque Foundation has had on the community, particularly the youth. While a youth group was formed very early on to cater to the needs of the younger generation, a separate building designated for the youth was purchased and opened in 1996. We have witnessed young men who seemed destined to a life of crime and violence become outstanding citizens who are now students and professionals in a variety of fields, due largely in part to those dedicated youth mentors.
During the 1990’s, the Mosque Foundation community expanded greater than anyone could have predicted. The growing needs and increasing numbers required the Mosque Foundation to expand its original facility, which was completed in 1998. Yet, even as the new prayer area nearly doubled in size, two Friday Congregational Prayers and two evening Ramadan Taraweeh Prayers were still needed to serve the large community. Among the many functions of a mosque is to serve the needy, and its various roles in serving the community continues to grow. For example, in 2005 the Mosque Foundation opened a Community Food Pantry to help combat hunger for low income families in the local community.


WITNESS LIST
Pensions, Investments & Financial Services Committee
March 1, 2011 - 8:00 AM
Organizational Hearing
On:
Alston, Cheryl (Employees' Retirement Fund of the City of Dallas)
Ballard, Paul (Texas Treasury Safekeeping Trust Company)
Brewer, Carla (Employees' Retirement Fund of the City of Dallas)
Burns, Dwight (Texas Public Finance Authority)
Calderazzo, Michael (El Paso Firemen's and Policemen's Pension Fund)
Clark, Todd (Houston Fire Fighters Relief & Retirment Fund)
Cooper, Charles (Texas Department of Banking)
Feeney, Harold (Credit Union Department)
Foster, Doug (Texas Dept. of Savings and Mortgage Lending)
Gonzales, Christopher (Houston Firefighters' Relief & Retirement Fund)
Kline, Robert (Texas Bond Review Board)
Lawson, John (Houston Police Officers' Pension System)
Martin, Ron (El Paso Municipal Police Officers Assoc.)
Mose, Sherry (Houston Municipal Employees Pension System)
Parker, Annise (City of Houston)
Pettijohn, Leslie (Ofc. of Consumer Credit Commissioner)
Ryerson, Ruth (Fort Worth Employees' Retirement Fund)
Smith, Rhonda (Houston Municipal Employees Pension System)
Stanton, Robert (El Paso Firemen & Policemen's Pension Fund)
Tettamant, Richard (Dallas Police & Fire Pension System)
Van Houten, Richard (Fort Worth Police Officers' Association)
Villarreal, Johnny (Houston Fire Fighters Local 341)
Zivley, Benette (Securities Board)
1


You can check out your Akan name by simply keying in your data into the form below as requested and submit the data to see your Akan name.


Technical Models¶
Introduction¶
The technical models contain the technical properties of the motor, the power electronic converter and the load.
The motors and the loads can be parametrized by either choosing the number of its default set in the environment initialization or by passing a new Load or Motor parameter dictionary as described below. The parameters of the power electronic converter are directly included in the initialization.
DC Motor Parameter Dictionary¶
| Key | Description |
|---|---|
| r_a | Resistance of the armature circuit in Ohm |
| r_e | Resistance of the excitation circuit in Ohm |
| l_a | Inductance of the armature circuit in Henry |
| l_e | Inductance of the excitation circuit in Henry |
| l_e_prime | effective excitation inductance in Henry |
| psi_e | effective flux linkage in Henry Ampere |
| j | Moment of inertia of the motors rotor in kg/m^2 |
| u_sup | Supply voltage of the motor in Volt |
| i_N | Nominal current in Ampere (only PermEx and Series) |
| i_a_N | Nominal armature current in Ampere(only ExtEx and Shunt) |
| i_e_N | Nominal excitation current in Ampere (only ExtEx and Shunt) |
| u_N | Nominal voltage in Volt(only PermEx, Series and Shunt) |
| u_a_N | Nominal armature voltage in Volt (only ExtEx) |
| u_e_N | Nominal excitation voltage in Volt (only ExtEx) |
| torque_N | Nominal torque in Nm |
| omega_N | Nominal angular velocity rad/s |
PMSM Parameter Dictionary¶
| Key | Description | Default |
|---|---|---|
| R_s | Stator Resistance in Ohm | 4.9 |
| L_d | d-axis inductance in Henry | 79e-3 |
| L_q | q-axis inductance in Henry | 113e-3 |
| J_rotor | Moment of inertia of the rotor | 2.45e-3 |
| Psi_p | Permanent linked rotor flux | 0.165 |
| p | Pole pair Number | 2 |
| u_sup | Supply voltage of the motor in Volt | 326.6 |
| i_N | Nominal peak phase current in Ampere | 11.3 |
| u_N | Nominal peak phase voltage in Volt | 326.6 |
| torque_N | Nominal torque in Nm | 9.55 |
| omega_N | Nominal mechanical angular velocity rad/s | 75.0 |
All nominal voltages and currents are peak phase values. Therefore, data sheet values for line voltages and phase currents has to be transformed such that \(U_N=\sqrt(2/3) U_L\) and \(I_N=\sqrt(2) I_S\).
Furthermore, the angular velocity is the electrical one and not the mechanical one \(\omega = p \omega_{me}\).
Load Parameter Dictionary¶
| Key | Description |
|---|---|
| a | Constant term in the load equation |
| b | Linear factor in the load equation |
| c | Quadratic factor in the load equation |
| J_load | Moment of inertia of the load |
DC Shunt Default Models¶
| Key | No 0 |
|---|---|
| r_a | 2.78 |
| r_e | 350.0 |
| l_a | 6.3e-3 |
| l_e | 160.0 |
| l_e_prime | 0.94 |
| j | 0.017 |
| u_sup | 420.0 |
| i_a_N | 50.0 |
| i_e_N | 1.2 |
| torque_N | 40.0 |
| omega_N | 368.0 |
DC Series Default Models¶
| Key | No 0 |
|---|---|
| r_a | 2.78 |
| r_e | 1.0 |
| l_a | 6.3e-3 |
| l_e | 1.6e-3 |
| l_e_prime | 0.05 |
| j | 0.017 |
| u_sup | 420.0 |
| i_N | 50.0 |
| torque_N | 250.0 |
| omega_N | 368.0 |
DC Permanently Excited Default Models¶
| Key | No 0 |
|---|---|
| r_a | 25.0 |
| r_e | 258.0 |
| l_a | 3.438e-2 |
| psi_e | 18 |
| j | 1.0 |
| u_sup | 400.0 |
| omega_N | 22.0 |
| i_N | 16.0 |
| torque_N | 288.0 |
DC Externally Excited Default Models¶
| Key | No 0 |
|---|---|
| r_a | 0.78 |
| r_e | 350.0 |
| l_a | 6.3e-3 |
| l_e | 60 |
| l_e_prime | 0.94 |
| j | 0.017 |
| u_sup | 420.0 |
| i_a_N | 50.0 |
| i_e_N | 1.2 |
| U_a_N | 420.0 |
| U_e_N | 420.0 |
| torque_N | 40.0 |
| omega_N | 368.0 |
DC Motor Models¶
DC Base Motor Model¶
-
class
gym_electric_motor.envs.gym_dcm.models.dcmotor_model.
_DcMotor
(load_eq, motor_parameter=None, load_j=0, motor_type='DcExtEx')[source]¶ The _DcMotor and its subclasses implement the technical system of a DC motor.
This includes the system equations, the motor parameters of the equivalent circuit diagram, as well as limits and bandwidth. The state array of the base motor is [ omega, i_a, i_e ]. It has got two input voltages [u_a, u_e].
Basic setting of all the common motor parameters.
Parameters: - load_eq – Load equation of the load model
- motor_parameter (dict or int) – Motor parameter set. This can either be an integer or a dictionary. If an integer is passed the motor parameter file from the conf.py is loaded. If a dict is passed this will become the parameter file.
-
bandwidth
()[source]¶ Calculate the bandwidth of the circuits based on the motor parameters
Returns: Tuple of the armature circuit and excitation circuit bandwidth
-
i_a_max
(omega)[source]¶ The maximum possible current through the armature circuit for a given speed omega for nominal supply voltage.
Parameters: omega – The speed of the motor in rad/s Returns: The maximum possible current i_a in Ampere for the given speed
-
i_in
(state)[source]¶ The current flowing into the motor in Amperes.
Parameters: state – The current state array of the motor Returns: The current flowing into the motor.
-
induced_voltage
(state)[source]¶ The induced voltage of the armature circuit.
Parameters: state – The current state array of the motor Returns: The voltage induced by the armature in Volt
-
jac
(state, dtorque_domega)[source]¶ The jacobian of the model.
Parameters: - state – The state values of the motor
- dtorque_domega – The derivative of the load by omega. Calculated by the load model
Returns: The jacobian matrix of the current motor state
-
model
(state, t_load, u_in)[source]¶ The differential system equation.
Parameters: - state – The state array of the motor.
- t_load – The load calculated by the load model
- u_in – The input voltages at the terminals [u_a, u_e]
Returns: The derivative of the state variables omega, i_a, i_e
-
torque
(state)[source]¶ The torque equation of the motor.
Parameters: state – The current state array of the motor Returns: The current torque of the motor based on the state.
DC Externally Excited Motor Model¶
DC Permanently Excited Motor Model¶
-
class
gym_electric_motor.envs.gym_dcm.models.dcmotor_model.
DcPermanentlyExcited
(load_fct, motor_parameter=None, load_j=0)[source]¶ Class that models a permanently excited DC motor. The state array of this motor is: [ omega, torque, i ]. It has got one input voltage: u_in
-
bandwidth
()[source]¶ Calculate the bandwidth of the circuits based on the motor parameters
Returns: Tuple of the armature circuit and excitation circuit bandwidth
-
i_a_max
(omega)[source]¶ The maximum possible current through the armature circuit for a given speed omega for nominal supply voltage.
Parameters: omega – The speed of the motor in rad/s Returns: The maximum possible current i_a in Ampere for the given speed
-
i_in
(state)[source]¶ The current flowing into the motor in Amperes.
Parameters: state – The current state array of the motor Returns: The current flowing into the motor.
-
induced_voltage
(state)[source]¶ The induced voltage of the armature circuit.
Parameters: state – The current state array of the motor Returns: The voltage induced by the armature in Volt
-
jac
(state, dtorque_domega)[source]¶ The Jacobian equation of the motor.
Parameters: - state – the current motor state
- dtorque_domega – the derivative of the load function over omega
Returns: The solution for the Jacobian equation for the Motor at the given state
-
model
(state, t_load, u_in)[source]¶ The differential system equation.
Parameters: - state – The state array of the motor.
- t_load – The load calculated by the load model
- u_in – The input voltages at the terminals [u_a, u_e]
Returns: The derivative of the state variables omega, i_a, i_e
-
torque
(state)[source]¶ The torque equation of the motor.
Parameters: state – The current state array of the motor Returns: The current torque of the motor based on the state.
-
DC Series Motor Model¶
-
class
gym_electric_motor.envs.gym_dcm.models.dcmotor_model.
DcSeriesMotor
(load_fct, motor_parameter=None, load_j=0)[source]¶ Class that models a DC series motor. The state array of this motor is: [ omega, torque, i ]. It has got one input voltage: u_in
-
bandwidth
()[source]¶ Calculate the bandwidth of the circuits based on the motor parameters
Returns: Tuple of the armature circuit and excitation circuit bandwidth
-
i_a_max
(omega)[source]¶ The maximum possible current through the armature circuit for a given speed omega for nominal supply voltage.
Parameters: omega – The speed of the motor in rad/s Returns: The maximum possible current i_a in Ampere for the given speed
-
i_in
(state)[source]¶ The current flowing into the motor in Amperes.
Parameters: state – The current state array of the motor Returns: The current flowing into the motor.
-
induced_voltage
(state)[source]¶ The induced voltage of the armature circuit.
Parameters: state – The current state array of the motor Returns: The voltage induced by the armature in Volt
-
jac
(state, load_jac)[source]¶ The jacobian of the model.
Parameters: - state – The state values of the motor
- dtorque_domega – The derivative of the load by omega. Calculated by the load model
Returns: The jacobian matrix of the current motor state
-
model
(state, t_load, u_in)[source]¶ The differential system equation.
Parameters: - state – The state array of the motor.
- t_load – The load calculated by the load model
- u_in – The input voltages at the terminals [u_a, u_e]
Returns: The derivative of the state variables omega, i_a, i_e
-
torque
(state)[source]¶ The torque equation of the motor.
Parameters: state – The current state array of the motor Returns: The current torque of the motor based on the state.
-
DC Shunt Motor Model¶
-
class
gym_electric_motor.envs.gym_dcm.models.dcmotor_model.
DcShuntMotor
(load_fct, motor_parameter=None, load_j=0)[source]¶ Class that models a DC shunt motor. The state array of this motor is: [ omega, torque, i_a, i_e ]. It has got one input voltage: u_in
-
bandwidth
()[source]¶ Calculate the bandwidth of the circuits based on the motor parameters
Returns: Tuple of the armature circuit and excitation circuit bandwidth
-
i_in
(state)[source]¶ The current flowing into the motor in Amperes.
Parameters: state – The current state array of the motor Returns: The current flowing into the motor.
-
jac
(state, dtorque_domega)[source]¶ The jacobian of the model.
Parameters: - state – The state values of the motor
- dtorque_domega – The derivative of the load by omega. Calculated by the load model
Returns: The jacobian matrix of the current motor state
-
model
(state, t_load, u_in)[source]¶ The differential system equation.
Parameters: - state – The state array of the motor.
- t_load – The load calculated by the load model
- u_in – The input voltages at the terminals [u_a, u_e]
Returns: The derivative of the state variables omega, i_a, i_e
-
PMSM Motor Model¶
-
class
gym_electric_motor.envs.gym_pmsm.models.pmsm_model.
PmsmModel
(motor_parameter=None, load_fct=<function PmsmModel.<lambda>>, load_j=0)[source]¶ Technical Model of a Permanent Magnet Synchronous Motor (PMSM).
- Description:
- This class contains the technical properties of a PMSM. This includes the differential equation (model), the motor parameters like inductances and resistances, the torque equation, the motor bandwidth and its limits. The motor will be represented in dq-coordinates.
Source:
- State Variables:
Index State Description 0 omega mechanical angular velocity of the motor in rad/s 1 i_q current flowing into branch a 2 i_d current flowing into branch b 3 epsilon rotation angle of the rotor
Initialize the motor. Set its parameters, determine constants, initialize the load model
Parameters: - motor_parameter – motor parameters
- load_fct – load function
- load_j – jacobian of the load function
-
bandwidth
()[source]¶ Calculation of the motors q and d components bandwidth. This is especially important for the reference generation in the environment.
Returns: The bandwidth of the q and the d component of the motor.
-
jac
(state, dt_load_dt, u_in)[source]¶ Not implemented yet, maybe obsolete. Calculate the Jacobian matrix for the system at given state, t_load and u_in.
Parameters: - state – state of the electric motor
- dt_load_dt – derivative of the load equation
- u_in – input voltage
Returns: Jacobian matrix for the system at given state, t_load and u_in.
-
max_torque
(omega)[source]¶ Calculate the maximum possible torque for a given speed omega.
Parameters: omega – angular velocity Returns: Maximum possible torque at angular velocity omega.
-
model
(state, t_load, u_qd)[source]¶ The differential equation of the PMSM.
Parameters: - state – The current state of the motor. [omega, i_q, i_d, epsilon]
- t_load – The mechanical load
- u_qd – The input voltages [u_q, u_d]
Returns: The derivatives of the state vector d/dt([omega, i_a, i_d, epsilon])
-
static
q
(quantities, epsilon)[source]¶ Transformation of the dq-representation into alpha-beta using the electrical angle
Parameters: - quantities – Array of two quantities in dq-representation. Example [i_d, i_q]
- epsilon – Current electrical angle of the motor
Returns: Array of the two quantities converted to alpha-beta-representation. Example [u_alpha, u_beta]
-
static
q_inv
(quantities, epsilon)[source]¶ Transformation of the alpha-beta-representation into dq using the elctrical angle
Parameters: - quantities – Array of two quantities in alpha-beta-representation. Example [u_alpha, u_beta]
- epsilon – Current electrical angle of the motor
Returns: Array of the two quantities converted to dq-representation. Example [u_d, u_q]
Note
The transformation from alpha-beta to dq is just its inverse conversion with negated epsilon. So this method calls q(quantities, -epsilon).
-
q_inv_me
(quantities, epsilon)[source]¶ Transformation of the alpha-beta-representation into dq using the mechanical angle
Parameters: - quantities – Array of two quantities in alpha-beta-representation. Example [u_alpha, u_beta]
- epsilon – Current mechanical angle of the motor
Returns: Array of the two quantities converted to dq-representation. Example [u_d, u_q]
Note
The transformation from alpha-beta to dq is just its inverse conversion with negated epsilon. So this method calls q(quantities, -epsilon).
-
q_me
(quantities, epsilon)[source]¶ Transformation of the dq-representation into alpha-beta using the mechanical angle
Parameters: - quantities – Array of two quantities in dq-representation. Example [i_d, i_q]
- epsilon – Current mechanical angle of the motor
Returns: Array of the two quantities converted to alpha-beta-representation. Example [u_alpha, u_beta]
-
static
t_23
(quantities)[source]¶ Transformation of PMSM-quantities like currents or voltages from abc representation to alpha-beta representation
Parameters: quantities – The properties in the abc representation like ‘’[u_a, u_b, u_c]’‘ Returns: The converted quantities in the alpha-beta representation like ‘’[u_alpha, u_beta]’‘
-
static
t_32
(quantities)[source]¶ Transformation of PMSM-quantities like currents or voltages from alpha-beta representation to abc representation
Parameters: quantities – The properties in the alpha-beta representation like ‘’[u_alpha, u_beta]’‘ Returns: The converted quantities in the abc representation like ‘’[u_a, u_b, u_c]’‘
Converters¶
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
Converter
(interlocking_time, tau, dead_time)[source]¶ Class that is modeling DC converter. It can be parametrized to the following converters by passing type=’{disc,cont}-{1Q,2Q,4Q}’ :
disc_act / cont_act / returns_cont:1 Quadrant: actions: 0, 1 / [0, 1] / [0, 1]
2 Quadrant: actions: 0, 1, 2 / [0, 1] / [0, 1]
4 Quadrant: actions: 0, 1, 2, 3/ [-1 , 1] / [-1, 1]
The specific converter also specifies the action space of the surrounding gym environment. Call convert(action, i_in) to calculate the normalised current output voltage at the converter. The return value is limited due to the constraints. Converter can consider a fixed dead time of one time step. If this option is selected, the action will be applied in the subsequent time step.
- cont:
- In this case dynamic averaging is applied and assumed that the converter works ideally except interlocking time. Due to this the output voltage is the same as the input voltage and the added voltage error of the interlocking. The interlocking has got only an effect at the 2Q converter.
- disc:
- In this case the action includes the switching commands for the transistors and the converter determines the output voltage, depending on the last switching state, input current and action. The interlocking time is considered as well. It is not possible to switch between every switching states instantaneously and due to this, further states are included. This is described more detailed in the subclass of the 4Q Converter.
1Q: It consists of one transistor and at least on diode and only positive voltages and currents are possible.
2Q: It is an asymmetric half-bridge, such that only positive voltages and currents in both directions are possible.
4Q: Two half-bridges are in parallel and voltage and currents can be positive and negative.
General converter constructor.
Basic components tau and the interlocking_time are set. The dead_time_action contains the action of the previous time step.
Parameters: - interlocking_time – interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – Specifies if a dead time of one time step is considered
-
convert
(action, i_in, t)[source]¶ The concrete conversion function of the converter.
Call this function and the selected conversion function will be called. It is implemented by the subclasses
Parameters: - action – The selected action by the agent.
- i_in – The current flowing into the motor.
- t – The time of the system
Returns: The concrete conversion function
-
determine_current_action_cont
(action)[source]¶ This function determines the applied action based on the current and previous action and the dead time for continuous converter. If a dead time is considered the action will be applied one step later.
Parameters: action – The selected action by the agent
-
determine_current_action_disc
(action, t)[source]¶ This function determines the applied action based on the current and previous action and the dead time for discrete converter. If the current time is larger than at the last call plus the interlocking time, the next sampling step is reached and the action of the previous time steps needs to be applied.
Parameters: - action – The selected action by the agent
- t – current time of the motor
-
interlocking_time
¶ Returns – interlocking time of the Converter in seconds
-
classmethod
make
(converter_type, tau, interlocking_time=0.0, dead_time=True)[source]¶ Factory class method for generating a converter.
Parameters: - converter_type – Type of the converter as string.
- tau – Cycle time of the environment
- interlocking_time – interlocking time of the converter that it takes to set a voltage at the output
- dead_time – specifies if a dead time will be considered
Returns: An initialized converter instance of the described type.
One Quadrant Converter¶
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
DiscreteOneQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ A discrete one quadrant converter (1QC).
Actions: {0,1}
For further information on all converters, look at the Converter Base class
General converter constructor.
Basic components tau and the interlocking_time are set. The dead_time_action contains the action of the previous time step.
Parameters: - interlocking_time – interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – Specifies if a dead time of one time step is considered
-
convert
(action, i_in, t)[source]¶ Function to calculate the effective voltage at the output of a discrete controlled 1QC.
Calculates the resulting input voltage at the input terminals of a DC motor by using a one quadrant converter. The action space is 0,1
action = 0: Transistor is off
action = 1: Transistor is on
A dead time of one sampling time step can be considered.
Parameters: - action – Valid values are 0 , 1
- i_in – output current of the converter and input current of the motor
- t – current time
Returns: The resulting voltage at the input of the following circuit
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
ContOneQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ A continuous one quadrant converter.
Actions: [0,1]
For further information on all converters, look at the Converter Base class
General converter constructor.
Basic components tau and the interlocking_time are set. The dead_time_action contains the action of the previous time step.
Parameters: - interlocking_time – interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – Specifies if a dead time of one time step is considered
-
convert
(action, i_in, *_)[source]¶ Function to calculate the effective voltage at the output of a continuously controlled 1QC.
Calculates the resulting input voltage at the input terminals of a DC motor by using a buck converter. The action space is [0,1], so only positive voltages are possible. A dead time of one sampling time step can be considered.
Parameters: - action – normalized desired voltage with respect to the supply voltage
- i_in – output current of the converter and input current of the motor, which must be positive
Returns: The resulting voltage at the input of the DC motor
Two Quadrant Converters¶
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
DiscreteTwoQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ Class models the 2Q Converter as an asymmetric half bridge. Actions are the switching commands.
Actions: {0, 1, 2}
For further information on all converters, look at the Converter Base class
General converter constructor.
Basic components tau and the interlocking_time are set.
Parameters: - interlocking_time – Interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – specifies if a dead time will be considered
-
convert
(action, i_in, t)[source]¶ Function to calculate the effective voltage at the output of a discrete controlled 2Q-Converter.
Calculates the resulting input voltage at the input terminals of a DC motor by using a two quadrant converter without pulse width modulation.
The actions are the discrete states of transistor 1 and 2.
0: no transistor active, both are blocking
1: Transistor 1 conducting
2: Transistor 2 conducting
Both transistors active would result in an short circuit and is illegal A dead time of one sampling time step can be considered.
Parameters: - action – Valid values are 0 (T1 off ,T2 off), 1 (T1 on, T2 off), 2 (T1 off, T2 on)
- i_in – output current of the converter and input current of the motor
- t – current time
Returns: The resulting voltage at the input of the following circuit
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
ContTwoQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ Class models the 2QC as an asymmetric half bridge. The action is the desired normalised input voltage for the motor.
General converter constructor.
Basic components tau and the interlocking_time are set. The dead_time_action contains the action of the previous time step.
Parameters: - interlocking_time – interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – Specifies if a dead time of one time step is considered
-
convert
(action, i_in, *_)[source]¶ Function to calculate the effective voltage at the output of a continuously controlled 2QC.
Calculates the resulting input voltage at the input terminals of a DC motor by using an ideal two quadrant converter. The action space is [0 , 1]. Only positive voltages but bidirectional currents are possible. A dead time of one sampling time step can be considered.
Parameters: - action – Valid values are in the range [0, 1] as a normalized desired voltage.
- i_in – output current of the converter and input current of the motor
Returns: The resulting average voltage at the input of the following circuit
Four Quadrant Converters¶
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
DiscreteFourQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ 4QC, consisting of two parallel half bridges The state space of the converter is larger, because it includes also the cases, when only one or no transistor is conducting. The definition of the states is given below. ‘1’ means conducting and ‘0’ is switched of. The first four (0-3) states are the actions of the action space.
T1 (upper left), T2( lower left), T3 (upper right), T4 (lower right)
T1 T2 T3 T4 0: 1 0 1 0 1: 1 0 0 1 2: 0 1 1 0 3: 0 1 0 1 4: 0 0 0 0 5: 1 0 0 0 6: 0 1 0 0 7: 0 0 1 0 8: 0 0 0 1 The switching table includes all transitions during the switching. The last state specifies the row and the column and the column is specified by the next action. The elements in the table define states that needs to be applied if you want to go from the last state to the next state. Due to the interlocking time, this can not always be done directly.
Initialisation of the discrete 4QC is special because further transformation matrices to consider the interlocking time needs to be setup. More details can be found in the init of the base class.
Parameters: - interlocking_time – Interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – specifies if a dead time will be considered
-
convert
(action, i_in, t)[source]¶ Function to calculate the effective voltage at the output of a discrete controlled 4QC.
Calculates the resulting input voltage at the input terminals of a DC motor by using an ideal four quadrant converter. The Transistors in one branch are switched complementary, so T1 and T3 define the states of T2 and T4.
The discrete action space is {0,1,2,3}.
A dead time of one sampling time step can be considered.
Parameters: - action – Valid values are {0,1,2,3} for the switching states.
- i_in – output current of the converter and input current of the motor
- t – current time
Returns: The resulting average voltage at the input of the following circuit
-
class
gym_electric_motor.envs.gym_dcm.models.converter_models.
ContFourQuadrantConverter
(interlocking_time, tau, dead_time)[source]¶ 4QC, consisting of two parallel half bridges The action is the desired input voltage for the motor.
General converter constructor.
Basic components tau and the interlocking_time are set. The dead_time_action contains the action of the previous time step.
Parameters: - interlocking_time – interlocking time of the Converter between the switches of the Transistors
- tau – Time constant of the whole system
- dead_time – Specifies if a dead time of one time step is considered
-
convert
(action, i_in, *_)[source]¶ Function to calculate the effective voltage at the output of a continuously controlled 4QC.
Calculates the resulting input voltage at the input terminals of a DC motor by using an ideal four quadrant converter. The action space is [-1, 1] and positive and negative voltages and currents are possible.
A dead time of one sampling time step can be considered.
Parameters: - action – Valid values are in the range [-1, 1] as a normalized desired voltage.
- i_in – output current of the converter and input current of the motor
Returns: The resulting average voltage at the input of the following circuit
Two Level Three Phase Converters¶
-
class
gym_electric_motor.envs.gym_pmsm.models.converter_models.
Disc2Level3PhaseConverter
(interlocking_time=0, tau=1e-05, dead_time=True)[source]¶ Converter for switching sequences. From DC to three phases ac with a B6 bridge and transistors are used such that three half-bridges are in parallel. 8 different switching states are possible with the following meaning:
H_1 H_2 H_3 0 lower lower lower 1 lower lower upper 2 lower upper lower 3 lower upper upper 4 upper lower lower 5 upper lower upper 6 upper upper lower 7 upper upper upper A lower position means -u_dc/2 and upper position means +u_dc/2. Because of interlocking times further states are used.  This state is never used Each half-bridge is computed on its own. Lower position of the half-bridge means state 01 and upper position means state 02. The 00 state is only used in interlocking times.
A symmetric output voltage range from -u_dc/2 to +u_dc/2 is used with the supply voltage u_dc and an imaginary zero reference point in the center for the converter, such that this shifted voltage range can be used. A dead time of one time step can be considered.
Basic Setting of Converter
Parameters: - interlocking_time – interlocking time of the converter
- tau – sampling time
- dead_time – specifies if a dead time of one sampling interval should be considered
-
convert
(action, i_in, t)[source]¶ The three output voltages of the converter are determined considering dead time and interlocking time.
Parameters: - action – desired switching state from the agent/controller
- i_in – input current into the motor
- t – current time
Returns: Normalised output voltage of the converter
-
interlocking_time
¶ Returns – interlocking time of the Converter in seconds
-
class
gym_electric_motor.envs.gym_pmsm.models.converter_models.
Cont2Level3PhaseConverter
(interlocking_time=0, tau=0.0001, dead_time=True)[source]¶ This class includes the continuous controller using dynamic averaging. It is assumed that the PWM and B6 bridge works well, the desired output voltage is achieved and the interlocking error is added. The errors due to zero crossings of the current are neglected. A dead time of one time step is considered. The action space is continuous and contains normalised voltages between zero and one.
Basic setting of all the common parameter.
Parameters: - interlocking_time – interlocking time of the converter
- tau – sampling time
- dead_time – specifies if dead time of one sampling interval should be considered
-
convert
(action, i_in, *_)[source]¶ The three output voltages of the converter are determined. The voltages are the actions itself and the interlocking error
\(\Delta U=-\text{sign}(i_{in}) f_s {\tau}_{dead time} U_{sup}\). Also a dead time of one time step is considered.
Parameters: - action – desired switching state from the agent/controller
- i_in – input current into the motor
Returns: Normalised output voltage of the converter
-
interlocking_time
¶ Returns – interlocking time of the Converter in seconds
Load Model¶
-
class
gym_electric_motor.envs.gym_pmsm.models.load_models.
Load
(load_parameter=None)[source]¶ The load represents the mechanical part of the motor. Is is a polynomial of degree 2, that can be defined by passing a dict with the following keys:
‘a’: constant load
‘b’: load growing linear with omega (eg friction)
‘c’: load growing quadratically with omega (eg air resistance)
‘J_load’: loads moment of inertia
Parameters: load_parameter – dict containing the following keys:
’c’: Quadratic load coefficient
’b’: linear load coefficient
’a’: constant load coefficient
’J_load’: loads moment of inertia
or an integer to select the default load parameters from conf.py


module type ForwardsTransfer = sig
.. end
val name : string
For debugging purposes, the name of the analysis
val debug : bool ref
Whether to turn on debugging
type
t
The type of the data we compute for each block start. May be
imperative.
val copy : t -> t
Make a deep copy of the data
val stmtStartData : t Inthash.t
For each statement id, the data at the start. Not found in the hash
table means nothing is known about the state at this point. At the end
of the analysis this means that the block is not reachable.
val pretty : unit -> t -> Pretty.doc
Pretty-print the state
val computeFirstPredecessor : Cil.stmt -> t -> t
Give the first value for a predecessors, compute the value to be set
for the block
val combinePredecessors : Cil.stmt ->
old:t ->
t -> t option
Take some old data for the start of a statement, and some new data for
the same point. Return None if the combination is identical to the old
data. Otherwise, compute the combination, and return it.
val doInstr : Cil.instr ->
t -> t Dataflow.action
The (forwards) transfer function for an instruction. The
Cil.currentLoc
is set before calling this. The default action is to
continue with the state unchanged.
val doStmt : Cil.stmt ->
t ->
t Dataflow.stmtaction
The (forwards) transfer function for a statement. The
Cil.currentLoc
is set before calling this. The default action is to do the instructions
in this statement, if applicable, and continue with the successors.
val doGuard : Cil.exp ->
t ->
t Dataflow.guardaction
Generate the successor to an If statement assuming the given expression
is nonzero. Analyses that don't need guard information can return
GDefault; this is equivalent to returning GUse of the input.
A return value of GUnreachable indicates that this half of the branch
will not be taken and should not be explored. This will be called
twice per If, once for "then" and once for "else".
val filterStmt : Cil.stmt -> bool
Whether to put this statement in the worklist. This is called when a
block would normally be put in the worklist.


Exercise 18.
The file county-lender-data.csv 2 contains data similar to what we looked at in the previous problem, but for every county in the United States of America (all data is from the 2021 County Business Patterns (CBP) and 2021 American Community Survey (ACS) of the US Census [<IP_ADDRESS>]). This file contains:
County Name
State Name
The number of payday lenders or similar businesses (more accurately, these are businesses classified as NAICS code 522390 [<IP_ADDRESS>], which includes check-cashing and money-wiring services, in addition to payday lending) in that county.
The population of the county.
The percentage of the county which is white.
The percentage of the county which is Black.
The percentage of the county who identify as Hispanic (note that as this is a cultural identity, individuals who identify as Hispanic can be white, Black, or neither).
The median household income in the county.
The percentage of people in the county over age 18 who have a high school diploma (or equivalent) or higher degree.
The number of payday lenders (NAICS code 522390) per 100,000 people in each county.
Choose a state to examine. Using the code window below, a calculator, or a spreadsheet program, calculate the correlation between the number of payday lenders and population, percentage white, percentage Black, percentage Hispanic, median income, and percentage of people with a high school diploma or equivalent. Which of these correlations are strongest for your state? Which are weakest? Explain what this tells you about where payday lenders are located.
Now repeat the exercise above, but use the number of payday lenders per 100,000 people. Which correlations are strongest for your state? Which are weakest? Explain what this tells you about where payday lenders are located. Why is this more useful than what you uncovered above?


Virtual Riot Energy Drink Free Download By Virtual Riot
Virtual Riot Energy Drink Free Download Youtube
Virtual Riot Energy Drink Free Download By Biohazarddubstep
Virtual Riot Energy Drink Wubmonsta Remix By Wubmonsta
Virtual Riot Energy Drink Original Vocals By Miss Lina By Miss Lina 2
Virtual Riot Energy Drink By Wildgamer
Electro Virtual Riot Energy Drink Free Download Youtube
Virtual Riot Energy Drink Watch For Free Or Download Video
Energy Drink Virtual Riot Last Fm
Virtual Riot Energy Drink Free Download Nicozon
Virtual Riot Energy Drink No Copyright Sounds Free Download Ncs Pixlspace By Pixlspace
Virtual Riot Energy Drink Youtube
Virtual Riot Wikipedia
Virtual Riot Energy Drink Free Download Rappad
Virtual Riot Free Free Download Youtube
Steam Workshop Virtual Riot Energy Drink
Virtual Riot S Stream
Virtual Riot Dubstep Discografia Descargar 320 Kbps Caratula Actualizable 2019 Legion Dubstep
Energy Drink Virtual Riot Sheet Music For Piano Piano Duo Musescore Com
Virtual Riot Energy Drink 10hours Extreme Youtube
9kqabmvp1irssm
Virtual Riot Energy Drink Download Peatix
Virtual Riot Energy Drink Free Download Roblox Id Roblox Music Codes
Virtual Riot Energy Drink 1 Hour Youtube
Virtual Riot Virtual Riot Energy Drink Free Download Ifunny
Virtual Riot
Virtual Riot Energy Drink No Copyright Sounds Free Download Ncs Pixlspace Imgur
Virtual Riot Energy Drink Free Download Electromundo Amino
Virtual Riot Energy Drink By Bombn47


Cool Simple Site
Modern web elements with minimal styling for building your site
Home
Documentation
Components