Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the GEM cookbook to explain voltage supply usage #225

Open
XyDrKRulof opened this issue Dec 22, 2023 · 0 comments
Open

Extend the GEM cookbook to explain voltage supply usage #225

XyDrKRulof opened this issue Dec 22, 2023 · 0 comments
Assignees

Comments

@XyDrKRulof
Copy link
Collaborator

XyDrKRulof commented Dec 22, 2023

The GEM cookbook features a small paragraph explaining the usage of voltage supply and then an examplary gem.make() where the voltage is supply is being omitted:

# define a PMSM with discrete action space
env = gem.make(  
    motor_env_id,
    # visualize the results
    visualization=visualization,
    # parameterize the PMSM and update limitations
    motor=dict(
        motor_parameter=motor_parameter,
        limit_values=limit_values,
        nominal_values=nominal_values,
        motor_initializer=motor_initializer,
    ),
    # define the random initialisation for load and motor
    load=load,
    reward_function=rf,
    tau=tau,
    #supply=supply,
    reference_generator=rg,
    ode_solver='euler',
    callbacks=my_callback,
    physical_system_wrappers=physical_system_wrappers, # Pass the Physical System Wrappers
    constraints=constraints
)

However, it is extremely important to set the voltage supply to the limit voltage in case of a constant voltage supply. If you don't, the motor will behave very unexpected.

Another approach could be to automatically set the supply voltage to the limit voltage if nothing else is specified. Or to throw an error that the supply voltage was not given by the user while nominal and limit values were.

@XyDrKRulof XyDrKRulof self-assigned this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant