Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
rrodgeur committed Jul 5, 2024
2 parents 522a4bd + 2259d54 commit 8a02dbb
Show file tree
Hide file tree
Showing 18 changed files with 115 additions and 16 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,36 @@ __Remarks__: The library is currently not optimized to make it easier to read (w

## Features

The library provides the following functionalities mainly through C++ objects :
The library provides the following functionalities mainly through C++ objects.

### Controllers.

Controllers provided are:
* `Pid()`: Standard form of the PID regulator.
* `Pr()`: Proportional Resonant regulator.
* `Rst()`: Discrete form of Polynomial regulator.

`Pid()`, `Pr()` and `Rst()` inherit from the `Controller()` class which define the same interface.

### Filters

* `PllSinus()`: Software PLL (Phased Lock Loop)
* Digital filters: `LowPassFirstOrdreFilter()`, `NotchFilter()`

`Pid()`, `Pr()` and `Rst()` inherit from the `Controller()` class which define the same interface.
### Three phase system transformations.

It provides also three phase system transformation through a `static` class : `Transform` from `transform.h` header.
* `Idqo = Transform::to_dqo(Iabc, angle);`
* `Iabc = Transofrm::to_abc(Idqo, angle);`
* `Iabo = Transform::clarke(Iabc);`
* `Iabc = Transform::clarke_inverse(Iabo);`
* `Idqo = Transform::rotation_to_dqo(Iabo, angle)`
* `Iabo = Transform::rotation_to_clarke(Idqo, angle)`

It includes also types:
* `threephase_t`
* `dqo_t`
* `clarke_t`


## Installation
Expand Down
24 changes: 24 additions & 0 deletions src/control_factory.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
* Copyright (c) 2024 LAAS-CNRS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#include "control_factory.h"

Pid ControlFactory::pid(float32_t Ts, float32_t Kp, float32_t Ti, float32_t Td, float32_t N, float32_t lower_bound, float32_t upper_bound) {
Expand Down
24 changes: 24 additions & 0 deletions src/control_factory.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
* Copyright (c) 2024 LAAS-CNRS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#include "pid.h"
#include "pr.h"
#include "rst.h"
Expand Down
2 changes: 1 addition & 1 deletion src/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/fir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
3 changes: 2 additions & 1 deletion src/fir.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#ifndef FIR_H_
#define FIR_H_
#include <arm_math.h>
Expand Down
3 changes: 2 additions & 1 deletion src/pid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#include <zephyr/logging/log.h>
#include <errno.h>
#include "pid.h"
Expand Down
3 changes: 2 additions & 1 deletion src/pid.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#ifndef PID_H_
#define PID_H_
#include "controller.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/pr.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
3 changes: 2 additions & 1 deletion src/rst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#include <errno.h>
#include <zephyr/logging/log.h>
#include "rst.h"
Expand Down
3 changes: 2 additions & 1 deletion src/rst.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#ifndef RST_H_
#define RST_H_
#include "controller.h"
Expand Down
24 changes: 24 additions & 0 deletions src/transform.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
* Copyright (c) 2024 LAAS-CNRS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGPL-2.1
*/

/**
* @date 2024
* @author Régis Ruelland <[email protected]>
*/

#include "transform.h"

clarke_t Transform::clarke(three_phase_t Xabc)
Expand Down
2 changes: 1 addition & 1 deletion src/transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/
/**
* @date 2024
Expand Down
2 changes: 1 addition & 1 deletion src/trigo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/trigo.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGLPV2.1
* SPDX-License-Identifier: LGPL-2.1
*/

/**
Expand Down

0 comments on commit 8a02dbb

Please sign in to comment.