NefMoto

Technical => Reverse Engineering => Topic started by: dgpb on June 02, 2016, 02:08:46 PM



Title: Matlab & Simulink virtual algorytm representation
Post by: dgpb on June 02, 2016, 02:08:46 PM
Hi guys.

I was wondering If this is possible. I mean you can recreate a path form FR, and by tweaking different inputs you can see what's the output. Simulink has lots of blocks... BUT

I don't exactly know how to insert a map. I can see integrators, derivators/differenciators, transfer functions, ramps, PIDs... but not maps. Does anyone know it? This idea might be quite useful to simulate different situations, but I don't know if inserting maps is even possible.

(maybe using matrix? I don't know, any help would be great)


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: dgpb on June 04, 2016, 09:26:06 AM
Ok, fixed!

It was quite easy. I discovered how to do it a few minutes ago so I'll share with you guys.

This is a very simplified LAMBTS algorythm just to prove everything goes as planned (and it goes). In fact I've chosen intermediate values to force the program to interpolate and it does it right. You can also configure the way it behaves when inputs go off the table, extrapolation, clipping... It's very useful for more complicated diagrams.

(http://i66.tinypic.com/2j4se4o.jpg)

You have to select the block with a red arrow. By double clicking it in the diagram window, enter the values as a matrix, it allows you to transverse the data if needed. Then you enter the column and row values and you're ready to go. Enjoy!


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: ktm733 on June 04, 2016, 01:42:36 PM
I wonder if this would work for kfmiop and kfmirl? Have you tried kfldrl and kfldimx also with this program?


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: dgpb on June 04, 2016, 04:26:27 PM
I wonder if this would work for kfmiop and kfmirl? Have you tried kfldrl and kfldimx also with this program?

It should work as well. And you can complicate it as much as you want. You can implement limitations, regulations... I think pretty much whatever you need to recreate the majority of FR diagrams.

If I have time on the following days, I'll make another one more complicated.


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: ruan on August 04, 2016, 07:15:24 AM
I had a quick play a while back to see if I could make some sort of slightly cleaner EOI calculator for EDC - getting the data in is a bit of a pain, can't remember exactly how I did it now, IIRC I exported it to CSV then imported it somehow, but was quite a ballache in honesty. It's crude and not that fast, but was mostly to see whether I could use it for simulating more functions. I've also read that some functions used within EDC/ME are possibly made from high level Matlab generated C/C++.

(http://i.imgur.com/GgCsVSq.png)


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: Teitek on August 06, 2016, 11:08:28 AM
Very interesting


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: dream3R on August 07, 2016, 11:37:12 AM
good work, keep going!


Title: Re: Matlab & Simulink virtual algorytm representation
Post by: dgpb on August 10, 2016, 05:49:11 PM
Wow, I didn't expet my idea to be so successful  :o

Congratulations for your work mate, It'd be great if you keep posting your progress.