Failed to find library 'powerlib' matlab. Simulink program executing

17,362

Solution 1

As @Edric mentioned, powerlib is built into SimPowerSystems. The error you see can thus have two causes

(1) There is no installation of SimPowerSystems in your copy of Matlab. Type ver at the command prompt to check for what toolboxes you have installed. If SimPowerSystems doesn't show up in the list, you will have to get the toolbox, otherwise you won't be able to run the model.

(2) Your installation of SimPowerSystems is somehow corrupt. This has never happened to me in Matlab so far, but with modern technology, anything is possible. A fresh install should solve this.

Solution 2

powerlib is a Simulink library shipped as part of SimPowerSystems, see the product page here: http://www.mathworks.com/products/simpower/.

Solution 3

This should really be a comment on another answer, but I can't comment due to reputation.

From at least R2016b, perhaps earlier too, It's no longer called SimPowerSystems. It's now SimscapePowerSystems. You need that plus the bare Simscape package installed.

Share:
17,362
view
Author by

view

Updated on July 21, 2022

Comments

  • view
    view almost 2 years

    When I tried to run a Simulink program under my R2009a Matlab, it showed an error message as follows: Failed to find library 'powerlib' referenced by 'dcmotor_openloop/Armature Current '. This library must be on your MATLAB path.

    I'm wondering where I can find this powerlib.

  • view
    view over 13 years
    Thank you Jonas! I dont have the toolbox. It seems that I have to go to the lab for simulation.