Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
EllipticFilter.h
1/*
2 * Copyright (C) 2019-2025 Andrés Martínez Mera - andresmmera@protonmail.com
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef ELLIPTICFILTER_H
19#define ELLIPTICFILTER_H
20
21#include "../../Schematic/Network.h"
22#include "../../Schematic/component.h"
23#include "../TransmissionLineSynthesis/Microstrip.h"
24
25class ComponentInfo;
26class WireInfo;
27
28class EllipticFilter : public Network {
29public:
32 virtual ~EllipticFilter();
33 void synthesize();
34 void setSemilumpedMode(bool);
35
36private:
37 struct FilterSpecifications Specification;
38
39 std::vector<double>*Cseries_LP, *Lseries_LP,
40 *Cshunt_LP; // Elliptic network parameters
41 double RL; // Load resistance
42 bool semilumped = false; // Activate semilumped implementation mode
43 unsigned int virtual_nodes;
44
45 // Lowpass prototype
46 void EllipticTypeS();
47 void EllipticTypesABC();
48 double Sn(double, double);
49 std::complex<double> Sn(double, std::complex<double>);
50
51 //*********** Schematic synthesis ********************
52 void SynthesizeEllipticFilter();
53 void InsertEllipticSection(int&, QMap<QString, unsigned int>&, int, bool,
54 bool);
55
56 void Insert_LowpassMinL_Section(int&, QMap<QString, unsigned int>&,
57 unsigned int, bool, bool);
58 void Insert_HighpassMinC_Section(int&, QMap<QString, unsigned int>&,
59 unsigned int, bool, bool);
60
61 void Insert_LowpassMinC_Section(int&, QMap<QString, unsigned int>&,
62 unsigned int, bool, bool);
63 void Insert_HighpassMinL_Section(int&, QMap<QString, unsigned int>&,
64 unsigned int, bool, bool);
65 void Insert_LowpassSemilumpedMinC_Section(int&, QMap<QString, unsigned int>&,
66 unsigned int, bool, bool);
67 void Insert_HighpassSemilumpedMinL_Section(int&, QMap<QString, unsigned int>&,
68 unsigned int, bool, bool);
69
70 void Insert_Bandpass_1_Section(int&, QMap<QString, unsigned int>&,
71 unsigned int, bool, bool);
72 void Insert_Bandpass_2_Section(int&, QMap<QString, unsigned int>&,
73 unsigned int, bool, bool);
74
75 void Insert_Bandstop_1_Section(int&, QMap<QString, unsigned int>&,
76 unsigned int, bool, bool);
77 void Insert_Bandstop_2_Section(int&, QMap<QString, unsigned int>&,
78 unsigned int, bool, bool);
79};
80#endif
Definition infoclasses.h:26
Definition EllipticFilter.h:28
Definition Network.h:36
Definition infoclasses.h:100
Definition structures.h:115