<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>engin aydogan &#187; fuzzy logic</title>
	<atom:link href="http://engin.bzzzt.biz/tag/fuzzy-logic/feed/" rel="self" type="application/rss+xml" />
	<link>http://engin.bzzzt.biz</link>
	<description>&#039;s journal</description>
	<lastBuildDate>Wed, 28 Jul 2010 06:35:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PENSE &#8211; oPEN Simulation Environment</title>
		<link>http://engin.bzzzt.biz/2009/12/06/pense-open-simulation-environment/</link>
		<comments>http://engin.bzzzt.biz/2009/12/06/pense-open-simulation-environment/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 22:03:01 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[stuff i coded]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[fuzzy logic]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=33</guid>
		<description><![CDATA[Now, that I got a IDE/SATA USB case, I started looking at my very old HDDs. I found very old codes of mine, this is one of them. PENSE (oPEN Simulation Environment) was my thesis project. It is a framework which you can use to implement simulation easily. I wrote it in C++. Only dependency]]></description>
			<content:encoded><![CDATA[<p>Now, that I got a IDE/SATA USB case, I started looking at my very old HDDs. I found very old codes of mine, this is one of them. PENSE (oPEN Simulation Environment) was my thesis project. It is a framework which you can use to implement simulation easily. I wrote it in C++. Only dependency is GNU&#8217;s libmatheval to implement algorithms out of mathematical expressions easily. I even wrote documentation in LaTeX! :)</p>
<p>Anyway here&#8217;s <a href="http://engin.bzzzt.biz/files/libpense-20050615.tar.bz2">libpense </a>and <a href="http://engin.bzzzt.biz/files/pensedemo-20050615.tar.bz2">pensedemo</a>. Please note the autoconf masterpiece in the libpense :) it was a bitch to get it working but once it is working&#8230; well, it works. I remember compiling these codes on WIN32, Mac OS X and GNU/Linux without a single problem. Yes, I was young and stupid. I developed this on GNU/Linux :)</p>
<p>Oh, the documentation in <a href="http://engin.bzzzt.biz/files/thesis-latex.tar.bz2">LaTeX</a>, <a href="http://engin.bzzzt.biz/files/thesis.pdf">PDF</a> and the presentation in <a href="http://engin.bzzzt.biz/files/presentation.ppt">PPT</a> format is available. Also there&#8217;s a <a href="http://engin.bzzzt.biz/files/refman.pdf">reference manual</a> for libpense, I guess I just had too much time :)</p>
<p>A-hem, and you have to excuse any lameness you can spot, since this is a 4-year old code ;)</p>
<p>A sample code from pensedemo;</p>
<pre>        Environment env;
	Device::Source::PWM pwm( "pwm", &amp;env );
	pwm.setOn( true );
	pwm.setFrequency( pwm_freq );

	Device::Source::VoltageSource vs( 0, 4.8, "voltage source", &amp;env );
	vs.setOn( true );
	vs["output"] = 4.8;

	Device::Plant::DCMotor motor( "Maxon_118465", &amp;env );
	motor.setLoad( "0.0" );
	motor["J_r"] = 0.0000000503;
	motor["k_n"] = 252.374609;
	motor["I_o"] = 0.029;
	motor["V"] = 0.0;
	motor["R"] = 2.16;

	Device::Controller::FuzzyLogic f( 3, "fuzzy logic controller", &amp;env );

	f.setSetPoint( set_point );
	f.setInputDomainWidth( 5 );
	f.setOutputDomainRange( 0, 100 );

        // This is where we connect the devices together to form a feedback loop.
        // We connect the PWM controller to the Voltage Source so that PWM can turn
        // the VS on and off. Then we connect the voltage source to the DC Motor, so
        // that it can, well, run. Then we connect the angular velocity parameter of the
        // motor to the Fuzzy Logic controller, so that it can adjust the PWM controller
        // and control the speed of the motor.
	connect( &amp;pwm, "output", &amp;vs, "on" );
	connect( &amp;vs, "output", &amp;motor, "V" );
	connect( &amp;motor,"w", &amp;f, "input" );
	connect( &amp;f, "output", &amp;pwm, "duty" );</pre>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2009/12/06/pense-open-simulation-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
