Navigation Menu

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

Signal: discrete state-space, transfer function and LTI systems. #21

Closed
wants to merge 9 commits into from

Conversation

rgommers
Copy link
Member

Enhancement for signal module by Jeff Armstrong.

@ArmstrongJ
Copy link
Contributor

These changes should introduce equivalent functionality to the signal module for discrete-time LTI systems that was already present for continuous-time LTI systems.

@WarrenWeckesser
Copy link
Member

Jeff: This pull request is not forgotten! After a quick glance, it looks fine, but I'll do a more thorough review within a week.

@ArmstrongJ
Copy link
Contributor

I don't mean to be pushy, but has anyone had the chance to review this request? I was just curious with regards to its status.

@WarrenWeckesser
Copy link
Member

"I don't mean to be pushy..."

No worries, sometimes that's what it takes. :)

Obviously my plan to review it "within a week" didn't pan out. I'll get to it this weekend.

@WarrenWeckesser
Copy link
Member

I experimented with this over the weekend, and so far I think it looks good. Jeff, do know of any references for Tustin's method that includes the derivation for all four matrices? I spent most of my time experimenting with this, including writing some simple code to compare the output of a continuous time system to the discretized version. I'll get to some more picky code-level comments this weekend.

Updates to the module-level docs and the release notes should be added to this pull request ( http://projects.scipy.org/scipy/wiki/CheckinChecklist).

@ArmstrongJ
Copy link
Contributor

Warren, I've opened a pull request with Ralf containing a multitude of changes. I've actually rewritten much of the bilinear transformation code, and I appreciate your catching these bugs. If you have a look at the source I've added to the docstrings at:

G. Zhang, X. Chen, and T. Chen, “Digital redesign via the generalized bilinear
transformation,” Int. J. Control, vol. 82, no. 4, pp. 741–754, 2009.
(http://www.ece.ualberta.ca/~gfzhang/research/ZCC07_preprint.pdf)

I've actually modified the code to implement the generalized bilinear transformation, which is a "superset" of Tustin's approximation. The source's equations are in agreement with the thesis you linked (thanks for the link, btw), but allows for two additional methods, Euler's forward differencing and backward differencing. I've added the ability to call these two as well as the bilinear and a more generalized case since we basically get additional functionality for free.

ArmstrongJ added 2 commits August 29, 2011 18:08
@rgommers
Copy link
Member Author

Sorry Jeff, I forgot about that request - didn't realize you couldn't add commits to this pull request yourself.

It would be good if you could configure your editor to automatically strip whitespace at the end of lines by the way.

@ArmstrongJ
Copy link
Contributor

Ralf, no problem, and thanks for the help. Sorry about the whitespace as well. I'll try to fix that from now on.

@rgommers
Copy link
Member Author

rgommers commented Sep 8, 2011

Hi Warren, do you see a chance to get this merged by Saturday evening your time? I want to create the 0.10.x branch on Sunday.

@WarrenWeckesser
Copy link
Member

I'll work on it Saturday, and hopefully all will be well and we'll be able to push it to master.

@ArmstrongJ
Copy link
Contributor

Warren and Ralf, I'll try to keep an eye on things this weekend and respond to any remaining issues asap.

@WarrenWeckesser
Copy link
Member

In the latest version of cont2discrete, when you handle the tf and zpk cases by recursively calling cont2discrete, you need to also pass in alpha.

@ArmstrongJ
Copy link
Contributor

Warren, I'll work on these this evening. Good catches so far.

@WarrenWeckesser
Copy link
Member

Jeff, I don't have any more significant comments at this point. Ideally, I'd like to see an "Examples" section added to all the functions, and unit tests for all the various uses of all the functions' keyword arguments, but as they say, "The perfect is the enemy of the good", and this is good. I now have an assortment of scripts that I could eventually convert into additional unit tests for cont2discrete, dlsim, dstep and dimpulse, but I probably won't have time to do that before Ralf branches 0.10b1. If you can make the changes for the comments I've made so far, I think we can push this to the trunk.

…lsim now accepts 1-D input vectors. Minor string and doc updates.
@ArmstrongJ
Copy link
Contributor

Warren, I opened a pull request with the changes that should cover your comments to Ralf for inclusion in this pull request. I appreciate this review and your input, and I look forward to seeing more tests added.

@rgommers
Copy link
Member Author

I've committed this after a little history rewriting. I am fine with committing some more unit tests and doc improvements to the 0.10.x branch after the beta release. Thanks Jeff and Warren!

@rgommers rgommers closed this Sep 11, 2011
@WarrenWeckesser
Copy link
Member

Pull request #78 adds some more tests.

mckib2 referenced this pull request in mckib2/scipy Apr 12, 2020
075b95922 Merge pull request #21 from ERGO-Code/presolveCleanBounds
862131490 Added cleanBounds to resolve minor inconsistencies in bounds after presolve and return error if large

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: 075b959220fa00469455f4b19dc0a677ddf9737c
mckib2 referenced this pull request in mckib2/scipy Jun 14, 2020
* Removed references to CONST_I_INF and CONST_INF; Added notes about HiGHS constants; made note that *_feasibility_tolerance doesn't apply to ipm

* Squashed 'scipy/optimize/_highs/' changes from 7cb7b58a9..c5e736e4a

c5e736e4a Return fun=None when solution is unavailable
fb29edf67 Comment out openmp pragma statments
afae7bbaa remove uneeded interface
eb7aad4ec Fix merge conflicts
f67d678ff Merge remote-tracking branch 'upstream/master'
5a6b5b422 Merge pull request scipy#377 from ERGO-Code/bug-presolve
50a8dbd3b Merge pull request scipy#378 from ERGO-Code/parser
c7c7b729a empty mps file
ef70118f6 formatting
4287eb3a8 fix
82695b7ec Formatted
b7526e770 Restored protection of call to timer.reportClocks();
493d9196f Merge pull request scipy#375 from ERGO-Code/gams-interface-fixup
beef381c6 negate row duals obtained from HiGHS
3285bdd62 do not pass invalid basis to HiGHS anymore
2dd53313c update copyright year
d103672c8 use gmoCompleteSolution instead of gmoCompleteObjective
c180bfe59 need to call HighsSetIO now to make it actually use callbacks, ref scipy#105
710fdff3c make the GAMS interface compile again
9dadda21a fix checks in assert
51e6b31d5 fix one of the compiler warnings
d9f28507f Merge pull request scipy#374 from ERGO-Code/presolveTimerEfficiency
7a4ee97eb Added  timer.recordFinish(SING_ROW); before status return
6d4ef9a96 Formatted
352d76917 Removed (redundant) start_time from HighsTimer.h
bc22fffa6 Reduced frequency of timeout test
42446efed Removed high-volume clock start/finish calls from presolve
982a0dc4a Revert back to earlier upstream commit
a600b38e4 Add note about cmake files; change single ticks to double back ticks in cython docstring; change byte-strings to python strings; remove uneeded commented-out code; clarify some comments
3dc432a10 Merge remote-tracking branch 'upstream/master'
69739a8a5 Remove unneeded files
46640196d More unneeded files
dc701d7d8 Remove uneeded files
dd7c8b480 Merge pull request scipy#371 from ERGO-Code/no-delete-JAJH
c008b7760 Refined timing reporting
85db78f6d Added some missing timer.recordFinish(rule) calls
0c9699aa0 deleted dev print
d17510e0a hw solving
e07521ea8 ctest passing
3eeac3c46 Merge pull request scipy#370 from ERGO-Code/matrix-copy
260643015 small ctest passing
dd6ef0551 formatting
aaf1aacf2 formatting
9f4b9fe82 previous
c6d26cfd6 back to list
ded0248f1 Merge branch 'master' into matrix-copy
7c9639bfa ctest passing but presolve reduction counts changed
adfbbb02c Merge pull request scipy#369 from ERGO-Code/openmp-version-cmake
94da4a2ac valgrind etamacro
837c5de2c presolve singleton lists changed into hash maps
04db154ce Merge branch 'master' into matrix-copy
01fa72dd1 Merge branch 'master' into matrix-copy
cf38c6074 newline of
184c2ff59 reverted typo in comment
086b075aa target_link_libraries
addd1f281 linking after defining lib cmake
6bb52c385 Merge pull request scipy#368 from ERGO-Code/dev-option
1c66fc894 setting OPENMP value
ba25299b8 cmake openmp version required: more modern cmake
75215f320 openmp only using if available
eebb4a7df update with master
53b4ace91 Merge branch 'master' into dev-option
6fed11c1f Merge pull request scipy#366 from ERGO-Code/dev-presolve
2c7e5b05e matrix-copy
3c0b5ee21 CMakeLists commented out scaffold subdir add
4b0ebee53 scaffold out
b7e7a23cc adding dev-presolve to scaffold GA
a53ff1b70 Merge pull request scipy#367 from ERGO-Code/CHUZC3
a9ed1c640 CHUZC sort strategy now controlled by option dual_chuzc_sort_strategy
fb1ef5de2 Adding CHUZC3 option
228f8d0a3 Tidied up HDualRow and reformatted
8b22df683 Moved debug code from HDualRow to HSimplexDebug
d08a669ee Moving the debug code from HDualRow
5d0eeebe0 experiments linux
5eacc5071 About to allow heap or quad
68432bdd4 Created metods for chooseFinalWorkGroupQuad() and chooseFinalLargeAlpha
e9e827252 After cleaning up printing and commenting out checking
7ea716b16 Before cleaning up after identifying why groups have different sizes with quad and heap
3ad48e421 formatting
4f899821d scaffold out
87bb623a9 dev option and other working as expected
177b910de About to add array for checking group equivalence
b733f091b boost po exception commented out
40f3352a5 Heap identification of breakpoint groups may be correct
92caf3e4c option dev added
962ca1891 Recognised that groups have to be filled using inner loop, but too tired to debug
0c82c9f9b Same workData and workGroup for adlittle with both methods
63f16f637 Found workGroup discrepancy
68a3e2a1c About to rename some new identifiers
d6497317b Memory proboem: ask Ivet
66516d76d About to create chooseWorkGroupHeap
e6928afac formatting
0fb9da3ad presolve time_limit works
46c3790f8 Fixed bug in permuteSimplexLp when LP is not scaled
538f2efcf debugDualChuzcFail now analyses and reports on dual CHUZC failure
88d8eb356 formatting
414998743 timeout returning
03e07cdeb Added timing and reporting to identify inefficiency in CHUZC3
d30f93867 Added analyse_lp = true with HiGHSDEV=on
f992d54ee removed function: do in separate CL since this one has grown
034fa18af added chrono
56c75804d unit test fixed
9ad6fa14f clean up
430b45331 scaffold out
338af92c9 options tests pass
453eb30f6 mps parser timeout works:
1e2ef6728 parser stopping on timeout but simplex running anyway
2d6e70f71 ctest passing, now add timeout and iteration tests to dev-presolve
257b62632 CL growing, added timeout to parser, linking dev with call backs
8153e9489 Switched on full reporting when HiGHSDEV=on, and eliminates time reporting when no calls have been made
1365960c2 time limit added, not tested yet
6e69c6635 link the modern cmake way
118c46ef4 enabled openmp in windows tests

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: c5e736e4a6bab95ee9a43d945d0ff4ef09907b3c

* Squashed 'scipy/optimize/_highs/' changes from c5e736e4a..6a0f8f69c

6a0f8f69c Add integer checks for integer options

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: 6a0f8f69c8a9f7305cbc074f70c49858402dda8c

* Squashed 'scipy/optimize/_highs/' changes from 6a0f8f69c..bb9407835

bb9407835 Merge pull request scipy#46 from ERGO-Code/master
a3c6c364b Merge pull request scipy#380 from ERGO-Code/presolveNumerics
a82b3bd6a Merge pull request scipy#379 from ERGO-Code/kkt-check
58c9dee0d Reinstated the iPrint condition for reporting clocks and numerics
9636520d6 Removed two print statements in HMPSIO.cpp; tidied compiler warning in HighsLp::equalButForNames - which was useless; renamed reportAllNumericsRecord reportNumericsRecords; Formatted
2e77d5c7d Formatted
09fd31bcb Removed commented-out code and comments for discussion, plus implemented conclusions
b8535efc1 Assigning eps tolerance to fixed_column_tolerance to avoid positive tolerance assert
415c44a51 Added analysis of fixed column numerics in presolve
798b84cee Merged kkt-check into this branch
1259aaa9c Merge branch 'master' into presolveNumerics
c7335db52 Added model name to results summary
23662ad92 formatting
62fccfb11 Merge branch 'master' into kkt-check
ed73f349d bug in new checker fixed. PR before dev of presolve
4c3f6f999 removeFixed* methods in Presolve class
0fac66922 removeFixed method and new checker bug fix. inconsistency in Fixed Cols rule
dbf663603 checkKkt() method added to the Presolve class@
2a7c0630b merge with master
d1a1069a8 formatting
6404d5aef Fixed Windows build error :-)
36d09bfed Formatted
9bfba4856 Added analysis of inconsistent bounds test in removeRowSingletons
b5aea5a5f Generalised presolve numerics records as enum of indices into vector of records
b7cb195bb Removed duplicate rule definitions due to merge
619468ac6 Resolved conflicts after merging master into this branch
d8802a91d Formatted
5ee66483b Added analysis of two more numerical tolerances in presolve
4687bd5e4 Analysing and reporting the first four uses of tol in presolve
c1d62c651 Split the if-statement in removeDoubletonEquations
31093c2e3 regular ctest pass with both kkt checks enabled.
694959bd4 Looked at first few uses of tol in Presolve.cpp. Substituted specific identifiers in each case, and considered what the value should be
48af287ca compiling, segfaulting
22cc24f18 second half of checker, problems cleared
4956678be With high-call clocks commented out
02dac71b7 Added timing locks to start looking for missing 40% of presolve
27341ae9d halfway through checks, new checker
d37e582b7 all of ctest passing within tolerances (0 simplex iter). Old checker identifies failures wrong
d2e31361c old checker printing pass vs fail on postsolved solution before passing back to HiGHS.
773e9afc8 test files reverted
f35dc7574 clean up
85b515994 ctest passes with and without check
51595fb04 ctest passing
fca847451 fail. debug adlittle
f6e8a1f60 clearing and basis in postsolve
eb7e53883 destuctors added, one more special LP passing check
f9c073325 bug in tests fixed, now unit test fails as expected in checker where clock has not been finished. New KKT checker class test/DevKkt added.
c73683cef leak fixed, double free still failing
eebe3471b 280 passing, valgrind next fal
56017e817 issue 280 special case
8ef4409cf valgrind OK plus tidy up
b8b771115 valgrind

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: bb94078352096f77300bb070e4cf46a7ef050e62
matthew-brett pushed a commit to matthew-brett/scipy that referenced this pull request Jul 28, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants